Lunit 0.5

Unit Testing Framework for Lua

  Add it to your Download Basket!

 Add it to your Watch List!

0/5

Rate it!

What's new in Lunit 0.5:

  • 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.
Read full changelog
send us
an update
LICENSE TYPE:
MIT/X Consortium License 
USER RATING:
UNRATED
  0.0/5
DEVELOPED BY:
Michael Roth
HOMEPAGE:
www.mroth.net
CATEGORY:
ROOT \ Programming \ Quality Assurance and Testing
1 Lunit Screenshot:
Lunit - Usage message
Lunit is a unit testing framework for Lua, written in Lua. It provides currently 27 assert functions, 8 type checking functions and a few miscellaneous functions for usage as an easy unit testing framework.

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.

Example:

The example file "my_testcase.lua" with the following content:

require "lunit"

module( "my_testcase", lunit.testcase )

function test_success()
 assert_false( false, "This test never fails.")
end

function test_failure()
 fail( "This test always fails!" )
end

Run with the shell script "lunit" produces the following output:

# ./lunit my_testcase.lua
Loaded testsuite with 2 tests in 1 testcases.


 F.

2 Assertions checked.

 1) Failure (my_testcase.test_failure):
my_testcase.lua:10: failure
my_testcase.lua:10: This test always fails!

Testsuite finished (1 passed, 1 failed, 0 errors).

Last updated on November 22nd, 2009

requirements

#unit testing #testing framework #Lua testing #unit #testing #Lua #framework

Add your review!

SUBMIT