浏览代码

Haxe: added a test to make sure haxelib works

Andy Li 7 年之前
父节点
当前提交
937510d454
共有 3 个文件被更改,包括 14 次插入0 次删除
  1. 1 0
      test/config.sh
  2. 12 0
      test/tests/haxe-haxelib-install/Container.hx
  3. 1 0
      test/tests/haxe-haxelib-install/run.sh

+ 1 - 0
test/config.sh

@@ -93,6 +93,7 @@ imageTests+=(
 	'
 	[haxe]='
 		haxe-hello-world
+		haxe-haxelib-install
 	'
 	[hylang]='
 		hylang-sh

+ 12 - 0
test/tests/haxe-haxelib-install/Container.hx

@@ -0,0 +1,12 @@
+class Container {
+    static function main():Void {
+        switch (Sys.command("haxelib", ["newrepo"])) {
+            case 0: //pass
+            case code: Sys.exit(code);
+        }
+        switch (Sys.command("haxelib", ["install", "jQueryExtern"])) {
+            case 0: //pass
+            case code: Sys.exit(code);
+        }
+    }
+}

+ 1 - 0
test/tests/haxe-haxelib-install/run.sh

@@ -0,0 +1 @@
+../run-haxe-in-container.sh