[Tarantool-patches] [PATCH v2 luajit 06/30] test: disable PUC Lua tests confused by -v output

Sergey Ostanevich sergos at tarantool.org
Fri Mar 26 14:26:13 MSK 2021


Any follow-up ticket for this? Mention it in the commit message, and it's

LGTM.

Sergos


> On 26 Mar 2021, at 10:42, Sergey Kaplun <skaplun at tarantool.org> wrote:
> 
> Version and status are printed in stdout instead 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-Lua-5.1-tests/main.lua | 28 ++++++++++++++++++++--------
> 1 file changed, 20 insertions(+), 8 deletions(-)
> 
> diff --git a/test/PUC-Lua-5.1-tests/main.lua b/test/PUC-Lua-5.1-tests/main.lua
> index c11a576..56f56a0 100644
> --- a/test/PUC-Lua-5.1-tests/main.lua
> +++ b/test/PUC-Lua-5.1-tests/main.lua
> @@ -103,26 +103,37 @@ prepfile[[
> RUN("lua - < %s > %s", prog, out)
> checkout("1\tnil\n")
> 
> +-- Version and status are printed in stdout instead 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