瀏覽代碼

Lua : Unit testing additions

This integrates lua into the standard unit testing framework that Haxe
provides for its compiler.
Justin Donaldson 10 年之前
父節點
當前提交
c6baf56c63
共有 5 個文件被更改,包括 11 次插入2 次删除
  1. 1 1
      tests/README.md
  2. 1 0
      tests/RunCi.hx
  3. 4 1
      tests/unit/compile-lua.hxml
  4. 1 0
      tests/unit/compile.hxml
  5. 4 0
      tests/unit/unit.html

+ 1 - 1
tests/README.md

@@ -45,7 +45,7 @@ It is possible to run it in local machines too:
 
  1. Change to this directory.
  2. Compile the script: `haxe RunCi.hxml`.
- 3. Define the test target by `export TEST=$TARGET` (or `set "TEST=$TARGET"` on Windows), where `$TARGET` should be a comma-seperated list of targets, e.g. `neko,macro`. Possible targets are `macro`, `neko`, `js`, `php`, `cpp`, `flash9`, `as3`, `java`, `cs`, `python`, and `third-party`. However, `flash9`, `as3`, and `third-party` are not likely to work on local machines (TODO).
+ 3. Define the test target by `export TEST=$TARGET` (or `set "TEST=$TARGET"` on Windows), where `$TARGET` should be a comma-seperated list of targets, e.g. `neko,macro`. Possible targets are `macro`, `neko`, `js`, `lua`, `php`, `cpp`, `flash9`, `as3`, `java`, `cs`, `python`, and `third-party`. However, `flash9`, `as3`, and `third-party` are not likely to work on local machines (TODO).
  4. Run it: `neko RunCi.n`.
 
 Note that the script will try to look for test dependencies and install them if they are not found. Look at the `getXXXDependencies` functions for the details.

+ 1 - 0
tests/RunCi.hx

@@ -19,6 +19,7 @@ private typedef TravisConfig = {
 	var Macro = "macro";
 	var Neko = "neko";
 	var Js = "js";
+	var Lua = "lua";
 	var Php = "php";
 	var Cpp = "cpp";
 	var Flash9 = "flash9";

+ 4 - 1
tests/unit/compile-lua.hxml

@@ -1,3 +1,6 @@
 compile-each.hxml
-unit.Test
+-main unit.Test
 -lua bin/unit.lua
+-cmd lua bin/unit.lua
+
+

+ 1 - 0
tests/unit/compile.hxml

@@ -16,6 +16,7 @@ compile-java-runner.hxml
 
 --next compile-flash9.hxml
 --next compile-js.hxml
+--next compile-lua.hxml
 --next compile-neko.hxml
 --next compile-php.hxml
 --next compile-as3.hxml

+ 4 - 0
tests/unit/unit.html

@@ -47,6 +47,10 @@ iframe {
   <div class="label">Neko</div>
   <div id="neko_container" class="cont"><iframe src="bin/unit.n"></iframe></div>
 </div>
+<div class="window">
+  <div class="label">Lua</div>
+  <div id="lua_container" class="cont"><iframe src="bin/runexe.n?bin/lua/bin/unit.lua"></iframe></div>
+</div>
 <div class="window">
   <div class="label">Php</div>
   <div id="php_container" class="cont"><iframe src="bin/php/index.php"></iframe></div>