diff options
| author | Philipp Janda <siffiejoe@gmx.net> | 2015-01-17 02:17:25 +0100 |
|---|---|---|
| committer | Philipp Janda <siffiejoe@gmx.net> | 2015-01-17 02:17:25 +0100 |
| commit | 64783408a4a108812f22268c12f71c75f5399d81 (patch) | |
| tree | 2134d0dbc1287538220d677c682d43264cb29d85 /tests/test.lua | |
| parent | 6124b7b5e687eff120507dccfe98b72b7ddb702d (diff) | |
| download | lua-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/test.lua')
| -rwxr-xr-x | tests/test.lua | 10 |
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 | |||
| 22 | print( "testing Lua API ..." ) | 22 | print( "testing Lua API ..." ) |
| 23 | package.path = "../?.lua;"..package.path | 23 | package.path = "../?.lua;"..package.path |
| 24 | require("compat53") | 24 | require("compat53") |
| 25 | |||
| 26 | ___'' | ||
| 27 | do | ||
| 28 | local t = setmetatable( {}, { __index = { 1, false, "three" } } ) | ||
| 29 | for i,v in ipairs(t) do | ||
| 30 | print("ipairs", i, v) | ||
| 31 | end | ||
| 32 | end | ||
| 33 | |||
| 34 | |||
| 25 | ___'' | 35 | ___'' |
| 26 | print("math.maxinteger", math.maxinteger+1 > math.maxinteger) | 36 | print("math.maxinteger", math.maxinteger+1 > math.maxinteger) |
| 27 | print("math.mininteger", math.mininteger-1 < math.mininteger) | 37 | print("math.mininteger", math.mininteger-1 < math.mininteger) |
