From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp29.i.mail.ru (smtp29.i.mail.ru [94.100.177.89]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id C95FF469710 for ; Fri, 29 May 2020 17:09:19 +0300 (MSK) Date: Fri, 29 May 2020 17:08:21 +0300 From: Sergey Bronnikov Message-ID: <20200529140821.GA44219@pony.bronevichok.ru> References: <20200529110800.GD21558@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200529110800.GD21558@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH v5 08/10] Fix luacheck warnings in test/ List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Munkin Cc: o.piskunov@tarantool.org, tarantool-patches@dev.tarantool.org, Vladislav Shpilevoy , alexander.turenko@tarantool.org 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@tarantool.org wrote: > > 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 = { > > > > 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. > > 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.