[Tarantool-patches] [PATCH v2 luajit 11/30] test: adapt getlocal PUC test for vararg func
Sergey Kaplun
skaplun at tarantool.org
Thu Apr 1 14:37:48 MSK 2021
Igor,
Thanks for the review!
On 31.03.21, Igor Munkin wrote:
> 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.
The root reason of the previous patch is about counting of local
variable in caller. Here this local variable is used for counting
arguments amount.
>
> On 26.03.21, Sergey Kaplun wrote:
> > Lua 5.1 interprets `...` in the vararg functions like an additional
>
> Typo: s/like/as/.
Fixed.
>
> > 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/.
Fixed.
>
> >
> > 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/.
Fixed.
>
> > 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/.
Fixed.
>
> > +-- 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/.
Fixed.
>
> > +-- as test expects.
>
> <snipped>
>
> > --
> > 2.31.0
> >
>
> --
> Best regards,
> IM
--
Best regards,
Sergey Kaplun
More information about the Tarantool-patches
mailing list