Unit Testing Framework for Lua
To run Lunit you will need Lua 5.1 or higher. To find out more about Lua, please take a look at The Programming Language Lua.
The example file "my_testcase.lua" with the following content:
module( "my_testcase", lunit.testcase )
assert_false( false, "This test never fails.")
fail( "This test always fails!" )
Run with the shell script "lunit" produces the following output:
# ./lunit my_testcase.lua
Loaded testsuite with 2 tests in 1 testcases.
2 Assertions checked.
1) Failure (my_testcase.test_failure):
my_testcase.lua:10: This test always fails!
Testsuite finished (1 passed, 1 failed, 0 errors).
In a hurry? Add it to your Download Basket!
What's New in This Release:
- This release adds the function assert_match_error() and should be more compatible with Darwin and Mac OS X. A few bugs were fixed.
- Lunit is quite stable in the meantime.