[Tarantool-patches] [PATCH v2 luajit 11/30] test: adapt getlocal PUC test for vararg func

Igor Munkin imun at tarantool.org
Wed Mar 31 01:15:06 MSK 2021


Sergey,

Thanks for the patch! I can't understand why this patch is separated
from the previous one. Could you provide a rationale for this, please?
BTW as we discussed before: s/Closes/Resolves/, considering your changes
on the branch. Also consider the comments below.

On 26.03.21, Sergey Kaplun wrote:
> Lua 5.1 interprets `...` in the vararg functions like an additional

Typo: s/like/as/.

> first argument unlike LuaJIT does. So, `a:f()` function will not set
> corresponding table `arg`, as test expects.

Typo: s/set corresponding table `arg`/set the corresponding `arg` table/.

> 
> Implicit `arg` parameter for old-style vararg functions was finally
> removed in Lua 5.2. The test is adapted from PUC-Rio Lua 5.2 test suite
> by removing additional check for amountt of arguments via `arg.n`.

Typo: s/amountt/amount/.

> Lua 5.2 test suite is taken from
> https://www.lua.org/tests/lua-5.2.0-tests.tar.gz.
> 
> Part of tarantool/tarantool#5845
> Part of tarantool/tarantool#4473
> ---
>  test/PUC-Lua-5.1-tests/db.lua | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/test/PUC-Lua-5.1-tests/db.lua b/test/PUC-Lua-5.1-tests/db.lua
> index e5d8885..6985c29 100644
> --- a/test/PUC-Lua-5.1-tests/db.lua
> +++ b/test/PUC-Lua-5.1-tests/db.lua
> @@ -300,7 +300,16 @@ debug.sethook(function (e)

<snipped>

> +-- LuaJIT: Lua 5.1 interprets `...` in the vararg functions like

Typo: s/like/as/.

> +-- an additional first argument unlike LuaJIT does.
> +-- So, `a:f()` function will not set corresponding table `arg`,

Typo: s/set corresponding table `arg`/set the corresponding `arg` table/.

> +-- as test expects.

<snipped>

> -- 
> 2.31.0
> 

-- 
Best regards,
IM


More information about the Tarantool-patches mailing list