aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPhilipp Janda <siffiejoe@gmx.net>2015-01-17 02:17:25 +0100
committerPhilipp Janda <siffiejoe@gmx.net>2015-01-17 02:17:25 +0100
commit64783408a4a108812f22268c12f71c75f5399d81 (patch)
tree2134d0dbc1287538220d677c682d43264cb29d85 /tests
parent6124b7b5e687eff120507dccfe98b72b7ddb702d (diff)
downloadlua-compat-5.3-64783408a4a108812f22268c12f71c75f5399d81.tar.gz
lua-compat-5.3-64783408a4a108812f22268c12f71c75f5399d81.tar.bz2
lua-compat-5.3-64783408a4a108812f22268c12f71c75f5399d81.zip
add ipairs function that respects __index
Diffstat (limited to 'tests')
-rwxr-xr-xtests/test.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test.lua b/tests/test.lua
index ac415bc..ab25820 100755
--- a/tests/test.lua
+++ b/tests/test.lua
@@ -22,6 +22,16 @@ end
22print( "testing Lua API ..." ) 22print( "testing Lua API ..." )
23package.path = "../?.lua;"..package.path 23package.path = "../?.lua;"..package.path
24require("compat53") 24require("compat53")
25
26___''
27do
28 local t = setmetatable( {}, { __index = { 1, false, "three" } } )
29 for i,v in ipairs(t) do
30 print("ipairs", i, v)
31 end
32end
33
34
25___'' 35___''
26print("math.maxinteger", math.maxinteger+1 > math.maxinteger) 36print("math.maxinteger", math.maxinteger+1 > math.maxinteger)
27print("math.mininteger", math.mininteger-1 < math.mininteger) 37print("math.mininteger", math.mininteger-1 < math.mininteger)