浏览代码

fixed failing test

Nicolas Cannasse 11 年之前
父节点
当前提交
7d0cfdae0a
共有 2 个文件被更改,包括 7 次插入4 次删除
  1. 6 3
      tests/RunTravis.hx
  2. 1 1
      tests/sys/src/TestSys.hx

+ 6 - 3
tests/RunTravis.hx

@@ -371,6 +371,9 @@ class RunTravis {
 	static function main():Void {
 		changeDirectory(unitDir);
 		Sys.putEnv("OCAMLRUNPARAM", "b");
+		
+		var args = ["foo", "12", "a b c\\ &<>[\"]#{}|"];
+		
 		switch (test) {
 			case Macro, null:
 				runCommand("haxe", ["compile-macro.hxml"]);
@@ -410,7 +413,7 @@ class RunTravis {
 				changeDirectory(sysDir);
 				runCommand("haxe", ["compile-neko.hxml"]);
 				changeDirectory("bin/neko");
-				runCommand("neko", ["sys.n", "foo", "12", "a b c\\\\"]);
+				runCommand("neko", ["sys.n"].concat(args));
 			case Php:
 				getPhpDependencies();
 				runCommand("haxe", ["compile-php.hxml"]);
@@ -423,7 +426,7 @@ class RunTravis {
 				changeDirectory(sysDir);
 				runCommand("haxe", ["compile-python.hxml"]);
 				changeDirectory("bin/python");
-				runCommand("python3", ["sys.py", "foo", "12", "a b c\\\\"]);
+				runCommand("python3", ["sys.py"].concat(args));
 			case Cpp:
 				getCppDependencies();
 				runCommand("haxe", ["compile-cpp.hxml"]);
@@ -437,7 +440,7 @@ class RunTravis {
 				changeDirectory(sysDir);
 				runCommand("haxe", ["compile-cpp.hxml"]);
 				changeDirectory("bin/cpp");
-				runCommand("./Main-debug", ["foo", "12", "a b c\\\\"]);
+				runCommand("./Main-debug", args);
 			case Js:
 				getJSDependencies();
 

+ 1 - 1
tests/sys/src/TestSys.hx

@@ -4,7 +4,7 @@ class TestSys extends haxe.unit.TestCase {
 		assertEquals(3, args.length);
 		assertEquals("foo", args[0]);
 		assertEquals("12", args[1]);
-		assertEquals("a b c\\", args[2]);
+		assertEquals("a b c\\ &<>[\"]#{}|", args[2]);		
 	}
 
 	function testEnv() {