فهرست منبع

removed duplicated test on Windows

Andy Li 9 سال پیش
والد
کامیت
ad36bb62fe
1فایلهای تغییر یافته به همراه19 افزوده شده و 19 حذف شده
  1. 19 19
      tests/sys/src/TestSys.hx

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

@@ -76,29 +76,29 @@ class TestSys extends haxe.unit.TestCase {
 
 
 
 
 			//call without ext
 			//call without ext
-			var scriptExt = switch (Sys.systemName()) {
-				case "Windows":
-					".bat";
-				case "Mac", "Linux", _:
-					"";
-			}
-			var path = sys.FileSystem.absolutePath("temp/" + name + scriptExt);
-			sys.io.File.saveContent(path, scriptContent);
-
 			switch (Sys.systemName()) {
 			switch (Sys.systemName()) {
-				case "Mac", "Linux":
-					var exitCode = Sys.command("chmod", ["a+x", path]);
-					assertEquals(0, exitCode);
 				case "Windows":
 				case "Windows":
 					//pass
 					//pass
-			}
+				case "Mac", "Linux", _:
+					var scriptExt = "";
+					var path = sys.FileSystem.absolutePath("temp/" + name + scriptExt);
+					sys.io.File.saveContent(path, scriptContent);
 
 
-			var random = Std.random(256);
-			var exitCode = Sys.command(path, [Std.string(random)]);
-			if (exitCode != random)
-				trace(name);
-			assertEquals(random, exitCode);
-			sys.FileSystem.deleteFile(path);
+					switch (Sys.systemName()) {
+						case "Mac", "Linux":
+							var exitCode = Sys.command("chmod", ["a+x", path]);
+							assertEquals(0, exitCode);
+						case "Windows":
+							//pass
+					}
+
+					var random = Std.random(256);
+					var exitCode = Sys.command(path, [Std.string(random)]);
+					if (exitCode != random)
+						trace(name);
+					assertEquals(random, exitCode);
+					sys.FileSystem.deleteFile(path);
+			}
 		}
 		}
 	}
 	}
 	#end //!cs
 	#end //!cs