[Tarantool-patches] [PATCH v2 luajit 27/30] test: disable PUC Lua test for checking arg layout

Sergey Kaplun skaplun at tarantool.org
Fri Mar 26 10:43:10 MSK 2021


Unlike LuaJIT, Tarantool doesn't store the given CLI flags in `arg`,
so the table has the following layout:
* arg[-1] -- the binary name
* arg[0]  -- the script name
* arg[N]  -- the script argument for all N in [1, #arg]

This patch disables test checking `arg` layout by negative indexes.

Part of tarantool/tarantool#5845
Part of tarantool/tarantool#4473
---
 test/PUC-Lua-5.1-tests/main.lua | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/test/PUC-Lua-5.1-tests/main.lua b/test/PUC-Lua-5.1-tests/main.lua
index 73bff52..acc50a6 100644
--- a/test/PUC-Lua-5.1-tests/main.lua
+++ b/test/PUC-Lua-5.1-tests/main.lua
@@ -71,7 +71,13 @@ local a = [[
 ]]
 a = string.format(a, progname)
 prepfile(a)
-RUN('lua "-e " -- %s a b c', prog)
+-- FIXME: Unlike LuaJIT, Tarantool doesn't store the given
+-- CLI flags in `arg`, so the table has the following layout:
+-- * arg[-1] -- the binary name
+-- * arg[0]  -- the script name
+-- * arg[N]  -- the script argument for all N in [1, #arg]
+-- Test is disabled for the Tarantool binary.
+-- RUN('lua "-e " -- %s a b c', prog)
 
 -- test 'arg' availability in libraries
 -- LuaJIT: LuaJIT v2.1.0-beta3 has extension from Lua 5.3:
-- 
2.31.0



More information about the Tarantool-patches mailing list