[Tarantool-patches] [PATCH luajit v3 06/29] test: disable PUC-Rio tests confused by -v output
Sergey Kaplun
skaplun at tarantool.org
Tue Apr 13 16:27:06 MSK 2021
Version and status are printed to stdout instead of stderr since
LuaJIT-2.0.0-beta11 (as it is not an error message).
See commit 0bd1a66f2f055211ef55834ccebca3b82d03c735
(Print version and JIT status to stdout, not stderr.).
This behavior is the same as in Lua 5.2.
This patch disables tests confused by unexpected -v output to stdout.
Relates to tarantool/tarantool#5687
Part of tarantool/tarantool#5845
Part of tarantool/tarantool#4473
---
test/PUC-Rio-Lua-5.1-tests/main.lua | 28 ++++++++++++++++++++--------
1 file changed, 20 insertions(+), 8 deletions(-)
diff --git a/test/PUC-Rio-Lua-5.1-tests/main.lua b/test/PUC-Rio-Lua-5.1-tests/main.lua
index 606ebacc..bc862c58 100644
--- a/test/PUC-Rio-Lua-5.1-tests/main.lua
+++ b/test/PUC-Rio-Lua-5.1-tests/main.lua
@@ -103,26 +103,37 @@ prepfile[[
RUN("lua - < %s > %s", prog, out)
checkout("1\tnil\n")
+-- FIXME: Version and status are printed to stdout instead of
+-- stderr since LuaJIT-2.0.0-beta11 (as it is not an error
+-- message). See commit 0bd1a66f2f055211ef55834ccebca3b82d03c735
+-- (Print version and JIT status to stdout, not stderr.).
+-- This behavior is the same as in Lua 5.2.
+-- In Lua 5.2 this feature was introduced via commit
+-- 9e7de9473c65baee1f567852a778f2d33a47ea83.
+-- See also https://github.com/tarantool/tarantool/issues/5687.
prepfile[[
= (6*2-6) -- ===
a
= 10
print(a)
= a]]
-RUN([[lua -e"_PROMPT='' _PROMPT2=''" -i < %s > %s]], prog, out)
-checkout("6\n10\n10\n\n")
+-- FIXME: Behavior is different for LuaJIT. See the comment above.
+-- RUN([[lua -e"_PROMPT='' _PROMPT2=''" -i < %s > %s]], prog, out)
+-- checkout("6\n10\n10\n\n")
prepfile("a = [[b\nc\nd\ne]]\n=a")
print(prog)
-RUN([[lua -e"_PROMPT='' _PROMPT2=''" -i < %s > %s]], prog, out)
-checkout("b\nc\nd\ne\n\n")
+-- FIXME: Behavior is different for LuaJIT. See the comment above.
+-- RUN([[lua -e"_PROMPT='' _PROMPT2=''" -i < %s > %s]], prog, out)
+-- checkout("b\nc\nd\ne\n\n")
prompt = "alo"
prepfile[[ --
a = 2
]]
-RUN([[lua "-e_PROMPT='%s'" -i < %s > %s]], prompt, prog, out)
-checkout(string.rep(prompt, 3).."\n")
+-- FIXME: Behavior is different for LuaJIT. See the comment above.
+-- RUN([[lua "-e_PROMPT='%s'" -i < %s > %s]], prompt, prog, out)
+-- checkout(string.rep(prompt, 3).."\n")
s = [=[ --
function f ( x )
@@ -140,8 +151,9 @@ assert( a == b )
=f( 11 ) ]=]
s = string.gsub(s, ' ', '\n\n')
prepfile(s)
-RUN([[lua -e"_PROMPT='' _PROMPT2=''" -i < %s > %s]], prog, out)
-checkout("11\n1\t2\n\n")
+-- FIXME: Behavior is different for LuaJIT. See the comment above.
+-- RUN([[lua -e"_PROMPT='' _PROMPT2=''" -i < %s > %s]], prog, out)
+-- checkout("11\n1\t2\n\n")
prepfile[[#comment in 1st line without \n at the end]]
RUN("lua %s", prog)
--
2.31.0
More information about the Tarantool-patches
mailing list