Add oslib tests.

This commit is contained in:
James Roseborough
2009-04-09 16:25:12 +00:00
parent 71f539ab2d
commit a414314114
2 changed files with 6 additions and 2 deletions

View File

@@ -116,6 +116,10 @@ public class CompatibiltyTest extends ScriptDrivenTest {
runTest("next");
}
public void testOsLib() throws IOException, InterruptedException {
runTest("oslib");
}
public void testPcalls() throws IOException, InterruptedException {
runTest("pcalls");
}

View File

@@ -8,7 +8,7 @@ print( 'os', os ~= nil )
print( 'os.clock()', pcall( os.clock ) )
print( 'os.date()', pcall( os.date ) )
print( 'os.difftime(123000, 21250)', pcall( os.difftime, 123000, 21250 ) )
print( 'os.execute("ipconfig")', pcall( os.execute, 'ipconfig' ) )
print( 'os.execute("hostname")', pcall( os.execute, 'hostname' ) )
print( 'os.execute("")', pcall( os.execute, '' ) )
print( 'os.getenv()', pcall( os.getenv ) )
print( 'os.getenv("bogus.key")', pcall( os.getenv, 'bogus.key' ) )
@@ -32,5 +32,5 @@ print( 'os.setlocale("us","monetary")', pcall( os.setlocale, "us", "monetary" )
print( 'os.setlocale(nil,"all")', pcall( os.setlocale, nil, "all" ) )
print( 'os.setlocale("c")', pcall( os.setlocale, "c" ) )
print( 'os.exit(123)' )
print( pcall( os.exit, -123 ) )
-- print( pcall( os.exit, -123 ) )
print( 'failed to exit' )