racker/lua-bourbon — pull request #3 by philips (2012-01-20 01:15:20+00:00)
Title: run: dump out the errors on assertion failures

the runner wasn't dumping the errors in a controlled manner. This fixes the issues and creates messages like this:

Running test_asserts_ok DONE
Running test_asserts_nil DONE
Error #1	assertion failed!	stack traceback:
/Users/philips/trees/lua-bourbon/lib/context.lua:21: in function 'assert'
/Users/philips/trees/lua-bourbon/lib/asserts.lua:24: in function 'is_nil'
/Users/philips/trees/lua-bourbon/tests/asserts.lua:16: in function
[C]: in function 'pcall'
/Users/philips/trees/lua-bourbon/lib/context.lua:34: in function 'run'
/Users/philips/trees/lua-bourbon/lib/run.lua:63: in function 'run_test'
/Users/philips/trees/lua-bourbon/lib/run.lua:94: in function 'iterator'
/Users/philips/trees/lua-bourbon/modules/async/init.lua:40: in function 'iterate'
/Users/philips/trees/lua-bourbon/modules/async/init.lua:49: in function 'callback'
/Users/philips/trees/lua-bourbon/lib/run.lua:61: in function 'callback'
/Users/philips/trees/lua-bourbon/lib/run.lua:45: in function 'done'
...
/Users/philips/trees/lua-bourbon/test.lua:15: in function 'iterator'
/Users/philips/trees/lua-bourbon/modules/async/init.lua:40: in function 'iterate'
/Users/philips/trees/lua-bourbon/modules/async/init.lua:54: in function 'forEachSeries'
/Users/philips/trees/lua-bourbon/test.lua:26: in function
[C]: in function 'xpcall'
[string "luvit"]: in main chunk
[C]: in function 'run'
[string "luvit"]: in main chunk
[C]: in function 'require'
[string "assert(require('luvit'))"]:1: in main chunkRunning test_asserts_equal DONE

Totals
checked: 0 failed: 1 passed: 2