Send test error output to System.err

This commit is contained in:
James Roseborough
2007-12-06 23:31:11 +00:00
parent e8e1aaf892
commit dc08fcbec2
2 changed files with 22 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
-- object ids
package.path = "?.lua;src/test/res/?.lua"
require 'ids'
ids = {}
@@ -83,6 +84,9 @@ t = {}
print( 'a(setmetatable(t)) ', a(function() return sm(t,{}) end) )
print( 'a(setmetatable(t*)) ', a(function() return sm(t,{__metatable='some string'}) end) )
print( 'a(setmetatable(t)) ', a(function() return sm(t,{}) end) )
print( 'a(setmetatable(t,nil)) ', a(function() return sm(t,nil) end) )
print( 'a(setmetatable(t)) ', a(function() return sm(t) end) )
print( 'a(setmetatable({},"abc")) ', a(function() return sm({},'abc') end) )
-- bad args to error!
print( 'error("msg","arg")', a(function() error('some message', 'some bad arg') end) )