[Tarantool-patches] [PATCH v2 05/10] test: refactor with _dofile
Максим Корякшин
m.kokryashkin at tarantool.org
Mon Jul 26 15:11:24 MSK 2021
Thanks for the review, Igor!
Here is the diff, that fixes typos in luajit-test-init.lua:
=================================================
diff --git a/test/luajit-test-init.lua b/test/luajit-test-init.lua
index feec17cf..acd3d60e 100644
--- a/test/luajit-test-init.lua
+++ b/test/luajit-test-init.lua
@@ -2,8 +2,8 @@
-- `_loadfile()` exists and uses it for code loading from test
-- files. If the variable is not defined then suite uses
-- `loadfile()` as default. Same for the `_dofile()`.
--- Lua-Harness also uses the same implementation of `dofile()`
--- fot he same reason
+-- lua-Harness also uses the same implementation of `dofile()`
+-- for the same reason.
-- XXX: Some tests in PUC Rio Lua 5.1 test suite clean `arg`
-- variable, so evaluate this once and use later.
=================================================
>Max,
>
>Thanks for the fixes! LGTM, except the three typos in
>luajit-test-init.lua.
>
>On 20.07.21, Maxim Kokryashkin wrote:
>> The patch[1] from lua-Harness suite is quite similar to commit
>> d11c5bbc08a118b11167c5d455d4024607dab662 ('test: adjust lua-Harness
>> tests that use dofile'), with the one difference (except the naming):
>> `make_specific_checks()` provides the particular behaviour to run the
>> tests for out-of-source build, however `_dofile()` allows user to
>> overload this function considering his purposes. If user leave
>> `_dofile()` untouched, it defaults to `dofile()` Lua standard library
>> function.
>>
>> It's worth to mention, that LuaJIT testing machinery has been using
>> such approach since commit 734cc0f1d508429c2c3c46bd1860398db0051060
>> ('test: adapt PUC-Rio suite for out-of-source build') and `_dofile()`
>> behaviour for running tests when out of source build is used is
>> already defined in luajit-test-init.lua.
>>
>> [1]: https://framagit.org/fperrad/lua-Harness/-/commit/60da289
>>
>> Part of tarantool/tarantool#5970
>> Part of tarantool/tarantool#4473
>> ---
>> test/lua-Harness-tests/101-boolean.t | 2 +-
>> test/lua-Harness-tests/102-function.t | 2 +-
>> test/lua-Harness-tests/103-nil.t | 2 +-
>> test/lua-Harness-tests/104-number.t | 2 +-
>> test/lua-Harness-tests/105-string.t | 2 +-
>> test/lua-Harness-tests/106-table.t | 2 +-
>> test/lua-Harness-tests/107-thread.t | 2 +-
>> test/lua-Harness-tests/108-userdata.t | 2 +-
>> test/lua-Harness-tests/203-lexico.t | 8 ++++----
>> test/lua-Harness-tests/231-metatable.t | 2 +-
>> test/lua-Harness-tests/301-basic.t | 2 +-
>> test/lua-Harness-tests/305-utf8.t | 4 ++--
>> test/lua-Harness-tests/404-ext.t | 2 +-
>> test/lua-Harness-tests/test_assertion.lua | 10 ++--------
>> test/luajit-test-init.lua | 2 ++
>> 15 files changed, 21 insertions(+), 25 deletions(-)
>>
>
><snipped>
>
>> diff --git a/test/luajit-test-init.lua b/test/luajit-test-init.lua
>> index 54a1f815..feec17cf 100644
>> --- a/test/luajit-test-init.lua
>> +++ b/test/luajit-test-init.lua
>> @@ -2,6 +2,8 @@
>> -- `_loadfile()` exists and uses it for code loading from test
>> -- files. If the variable is not defined then suite uses
>> -- `loadfile()` as default. Same for the `_dofile()`.
>> +-- Lua-Harness also uses the same implementation of `dofile()`
>
>Typo: s/Lua-Harness/lua-Harness/.
>
>> +-- fot he same reason
>
>Typo: s/fot/for/.
>Typo: Dot is missing at the end of the sentence.
>
>>
>> -- XXX: Some tests in PUC Rio Lua 5.1 test suite clean `arg`
>> -- variable, so evaluate this once and use later.
>> --
>> 2.32.0
>>
>
>--
>Best regards,
>IM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.tarantool.org/pipermail/tarantool-patches/attachments/20210726/ff67f7a7/attachment.htm>
More information about the Tarantool-patches
mailing list