[Tarantool-patches] [PATCH v5 08/10] Fix luacheck warnings in test/
Sergey Bronnikov
sergeyb at tarantool.org
Fri May 29 17:08:21 MSK 2020
Igor,
thanks for review!
On 14:08 Fri 29 May , Igor Munkin wrote:
> Sergey,
>
> Thanks for the patch! The patch is huge, so please split it into
> several, as we discussed. Nevertheless, I checked test/app-tap
> directory, please consider my comments below.
>
> On 12.05.20, sergeyb at tarantool.org wrote:
<snipped>
> > 168 files changed, 1145 insertions(+), 1233 deletions(-)
> >
> > diff --git a/.luacheckrc b/.luacheckrc
> > index e5c4c4509..26986ffb1 100644
> > --- a/.luacheckrc
> > +++ b/.luacheckrc
> > @@ -6,18 +6,18 @@ include_files = {
>
> <snipped>
>
> There is still a mess with suppressions, so I added the relevant ones
> from the branch:
>
> | files["test/app-tap/lua/require_mod.lua"] = {globals = {"exports"}}
> | files["test/app-tap/module_api.test.lua"] = {ignore = {"311"}}
>
> The suppression above seems to be excess and can be dropped.
Removed.
<snipped>
> > local s1 = '☢'
> > local s2 = 'İ'
> > - test:is(s1 < s2, false, 'test binary cmp')
> > - test:is(utf8.cmp(s1, s2) < 0, true, 'test unicode <')
> > - test:is(utf8.cmp(s1, s1) == 0, true, 'test unicode eq')
> > - test:is(utf8.cmp(s2, s1) > 0, true, 'test unicode >')
> > - test:is(utf8.casecmp('a', 'A') == 0, true, 'test icase ==')
> > - test:is(utf8.casecmp('b', 'A') > 0, true, 'test icase >, first')
> > - test:is(utf8.casecmp('B', 'a') > 0, true, 'test icase >, second >')
> > - test:is(utf8.cmp('', '') == 0, true, 'test empty compare')
> > - test:is(utf8.cmp('', 'a') < 0, true, 'test left empty compare')
> > - test:is(utf8.cmp('a', '') > 0, true, 'test right empty compare')
> > - test:is(utf8.casecmp('', '') == 0, true, 'test empty icompare')
> > - test:is(utf8.casecmp('', 'a') < 0, true, 'test left empty icompare')
> > - test:is(utf8.casecmp('a', '') > 0, true, 'test right empty icompare')
> > + testcase:is(s1 < s2, false, 'testcase binary cmp')
> > + testcase:is(utf8.cmp(s1, s2) < 0, true, 'testcase unicode <')
> > + testcase:is(utf8.cmp(s1, s1) == 0, true, 'testcase unicode eq')
> > + testcase:is(utf8.cmp(s2, s1) > 0, true, 'testcase unicode >')
> > + testcase:is(utf8.casecmp('a', 'A') == 0, true, 'testcase icase ==')
> > + testcase:is(utf8.casecmp('b', 'A') > 0, true, 'testcase icase >, first')
> > + testcase:is(utf8.casecmp('B', 'a') > 0, true, 'testcase icase >, second >')
> > + testcase:is(utf8.cmp('', '') == 0, true, 'testcase empty compare')
> > + testcase:is(utf8.cmp('', 'a') < 0, true, 'testcase left empty compare')
> > + testcase:is(utf8.cmp('a', '') > 0, true, 'testcase right empty compare')
> > + testcase:is(utf8.casecmp('', '') == 0, true, 'testcase empty icompare')
> > + testcase:is(utf8.casecmp('', 'a') < 0, true, 'testcase left empty icompare')
> > + testcase:is(utf8.casecmp('a', '') > 0, true, 'testcase right empty icompare')
>
> You also sed-ed test message above.
Good catch! Fixed.
<snipped>
More information about the Tarantool-patches
mailing list