diff options
author | Philipp Janda <siffiejoe@gmx.net> | 2015-01-20 01:02:20 +0100 |
---|---|---|
committer | Philipp Janda <siffiejoe@gmx.net> | 2015-01-20 01:02:20 +0100 |
commit | 489cd678823e0981ff2e4d2544b84094ed23c587 (patch) | |
tree | 2855dbabb9205957434129aa1119cb526d2ae01b /tests/test.lua | |
parent | f7f85b0826f7006b8dcc040111cd0ef8d42c2352 (diff) | |
download | lua-compat-5.3-489cd678823e0981ff2e4d2544b84094ed23c587.tar.gz lua-compat-5.3-489cd678823e0981ff2e4d2544b84094ed23c587.tar.bz2 lua-compat-5.3-489cd678823e0981ff2e4d2544b84094ed23c587.zip |
add lua_arith and lua_compare for Lua 5.1
Diffstat (limited to 'tests/test.lua')
-rwxr-xr-x | tests/test.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test.lua b/tests/test.lua index b59fd94..2b53b92 100755 --- a/tests/test.lua +++ b/tests/test.lua | |||
@@ -314,6 +314,15 @@ ___'' | |||
314 | print(mod.absindex("hi", true)) | 314 | print(mod.absindex("hi", true)) |
315 | 315 | ||
316 | ___'' | 316 | ___'' |
317 | print(mod.arith(2, 1)) | ||
318 | print(mod.arith(3, 5)) | ||
319 | |||
320 | ___'' | ||
321 | print(mod.compare(1, 1)) | ||
322 | print(mod.compare(2, 1)) | ||
323 | print(mod.compare(1, 2)) | ||
324 | |||
325 | ___'' | ||
317 | print(mod.tolstring("string")) | 326 | print(mod.tolstring("string")) |
318 | local t = setmetatable({}, { | 327 | local t = setmetatable({}, { |
319 | __tostring = function(v) return "mytable" end | 328 | __tostring = function(v) return "mytable" end |