Permalink
Browse files

Exit with error code when test fail

  • Loading branch information...
1 parent ca7f9e9 commit 4ae7a6c9c465b8a9659870e7562eb01486837591 @bluebird75 committed Nov 4, 2012
Showing with 3 additions and 3 deletions.
  1. +1 −1 example_with_luaunit.lua
  2. +2 −2 test_luaunit.lua
@@ -101,4 +101,4 @@ lu = LuaUnit
-- lu:setOutputType( "NIL" )
-- lu:setOutputType( "TAP" )
lu:setVerbosity( 0 )
-lu:run()
+os.exit( lu:run() )
View
@@ -8,7 +8,6 @@ License: BSD License, see LICENSE.txt
require('luaunit')
-
Mock = {
__class__ = 'Mock',
calls = {}
@@ -22,6 +21,7 @@ function Mock:new()
function t.callRecorder( callInfo )
-- Return a function that stores its arguments in callInfo
function f( ... )
+ -- Not lua 5.0 compliant:
args ={...}
for i,v in pairs(args) do
table.insert( callInfo, v )
@@ -510,5 +510,5 @@ TestLuaUnit = {} --class
-- debug.sethook( debug_print, 'cr' )
LuaUnit.verbosity = 2
-- LuaUnit:run( 'TestMock', 'TestLuaUnit:testRunSomeTestByName')
-LuaUnit:run()
+os.exit( LuaUnit:run() )

0 comments on commit 4ae7a6c

Please sign in to comment.