Improve documentation and tests.

This commit is contained in:
James Roseborough
2012-10-13 14:32:34 +00:00
parent 3d2812ed35
commit c921b033c5
5 changed files with 7 additions and 3 deletions

View File

@@ -745,5 +745,6 @@ and LuaForge:
<li>values associated with weak keys may linger longer than expected <li>values associated with weak keys may linger longer than expected
<li>behavior of luaj when a SecurityManager is used has not been fully characterized <li>behavior of luaj when a SecurityManager is used has not been fully characterized
<li>negative zero is treated as identical to integer value zero throughout luaj <li>negative zero is treated as identical to integer value zero throughout luaj
<li>lua compiled into java bytecode using luajc cannot use string.dump() or xpcall()
</ul> </ul>

View File

@@ -1,5 +1,5 @@
local platform = ... local platform = ...
print( 'platform', platform ) --print( 'platform', platform )
-- simple io-library tests -- simple io-library tests
-- --

Binary file not shown.

View File

@@ -1,5 +1,5 @@
local platform = ... local platform = ...
print( 'platform', platform ) --print( 'platform', platform )
local aliases = { local aliases = {
['0']='<zero>', ['0']='<zero>',

View File

@@ -149,7 +149,10 @@ strtests('lower', string.lower, s )
strtests('upper', string.upper, s ) strtests('upper', string.upper, s )
strtests('reverse', string.reverse, s ) strtests('reverse', string.reverse, s )
strtests('char', string.char, 92, 60, 61, 93 ) strtests('char', string.char, 92, 60, 61, 93 )
print( 'string.dump test:', load(string.dump(function(x) return 'foo->'..x end),'bar')('bat') ) stringdumptest = function()
return load(string.dump(function(x) return 'foo->'..x end),'bar')('bat')
end
print( 'string.dump test:', pcall(stringdujptest) )
-- floating point formats (not supported yet) -- floating point formats (not supported yet)