Add misc table tests.

This commit is contained in:
James Roseborough
2008-08-07 21:10:23 +00:00
parent 8f5c27fa10
commit 9f9d8872db

View File

@@ -160,3 +160,10 @@ print('a..',unpack({a('a', nil, nil)}))
print('.b.',unpack({a(nil, 'b', nil)}))
print('...',unpack({a(nil, nil, nil)}))
-- misc tests
print( # { 'abc', 'def', 'ghi', nil } ) -- should be 3 !
print( # { 'abc', 'def', 'ghi', false } ) -- should be 4 !
print( # { 'abc', 'def', 'ghi', 0 } ) -- should be 4 !
print( nil and 'T' or 'F' ) -- should be 'F'
print( false and 'T' or 'F' ) -- should be 'F'
print( 0 and 'T' or 'F' ) -- should be 'T'