Browse Source

[TravisCI] Test -D js-flatten.

Andy Li 11 years ago
parent
commit
1e392b8f26
2 changed files with 6 additions and 3 deletions
  1. 5 2
      tests/RunTravis.hx
  2. 1 1
      tests/unit/Test.hx

+ 5 - 2
tests/RunTravis.hx

@@ -432,8 +432,11 @@ class RunTravis {
 				runCommand("./Main-debug", ["foo", "12", "a b c\\\\"]);
 			case Js:
 				getJSDependencies();
-				runCommand("haxe", ["compile-js.hxml"]);
-				runCommand("node", ["-e", "var unit = require('./unit.js').unit; unit.Test.main(); process.exit(unit.Test.success ? 0 : 1);"]);
+
+				for (flatten in [true, false]) {
+					runCommand("haxe", ["compile-js.hxml"].concat(flatten ? ["-D", "js-flatten"] : []));
+					runCommand("node", ["-e", "var unit = require('./unit.js').unit; unit.Test.main(); process.exit(unit.Test.success ? 0 : 1);"]);
+				}
 
 				if (Sys.getEnv("TRAVIS_SECURE_ENV_VARS") == "true" && systemName == "Linux") {
 					//https://saucelabs.com/opensource/travis

+ 1 - 1
tests/unit/Test.hx

@@ -1,6 +1,6 @@
 package unit;
 
-@:expose
+@:expose("unit.Test")
 @:keepSub
 #if as3
 @:publicFields