Tarantool development patches archive
 help / color / mirror / Atom feed
From: Igor Munkin <imun@tarantool.org>
To: sergeyb@tarantool.org
Cc: o.piskunov@tarantool.org, tarantool-patches@dev.tarantool.org,
	Vladislav Shpilevoy <v.shpilevoy@tarantool.org>,
	alexander.turenko@tarantool.org
Subject: Re: [Tarantool-patches] [PATCH v5 08/10] Fix luacheck warnings in test/
Date: Fri, 29 May 2020 14:08:00 +0300	[thread overview]
Message-ID: <20200529110800.GD21558@tarantool.org> (raw)
In-Reply-To: <afaf7c097d3e004c26a9ad90c56c0717fb7863ed.1589275364.git.sergeyb@tarantool.org>

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:
> From: Sergey Bronnikov <sergeyb@tarantool.org>
> 
> Closes #4681
> 
> Reviewed-by: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
> Reviewed-by: Igor Munkin <imun@tarantool.org>
> 
> Co-authored-by: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
> Co-authored-by: Igor Munkin <imun@tarantool.org>
> ---
>  .luacheckrc                                   |  29 +-
>  test/app-tap/cfg.test.lua                     |   2 +-
>  test/app-tap/clock.test.lua                   |   4 +-
>  test/app-tap/console.test.lua                 |  16 +-
>  test/app-tap/console_lua.test.lua             |  22 +-
>  test/app-tap/csv.test.lua                     |  56 +-
>  test/app-tap/debug.test.lua                   |  10 +-
>  test/app-tap/errno.test.lua                   |  24 +-
>  test/app-tap/fail_main.test.lua               |   6 +-
>  .../gh-4761-json-per-call-options.test.lua    |  11 +-
>  test/app-tap/http_client.test.lua             | 297 +++++------
>  test/app-tap/iconv.test.lua                   |   6 +-
>  test/app-tap/init_script.test.lua             |  14 +-
>  test/app-tap/inspector.test.lua               |   5 +-
>  test/app-tap/json.test.lua                    |   1 -
>  test/app-tap/logger.test.lua                  |  21 +-
>  test/app-tap/minimal.test.lua                 |   4 +-
>  test/app-tap/module_api.test.lua              |  12 +-
>  test/app-tap/msgpackffi.test.lua              |   3 +-
>  test/app-tap/pcall.test.lua                   |   6 +-
>  test/app-tap/popen.test.lua                   |  35 +-
>  test/app-tap/snapshot.test.lua                |  17 +-
>  test/app-tap/string.test.lua                  | 502 +++++++++---------
>  test/app-tap/tap.test.lua                     |  26 +-
>  test/app-tap/tarantoolctl.test.lua            |  82 ++-
>  test/app-tap/trigger.test.lua                 |  48 +-
>  test/app-tap/yaml.test.lua                    |  16 +-

<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.

| files["test/app-tap/string.test.lua"] = {globals = {"utf8"}}

<snipped>

> diff --git a/test/app-tap/string.test.lua b/test/app-tap/string.test.lua
> index 02a1a84d7..be489fbc2 100755
> --- a/test/app-tap/string.test.lua
> +++ b/test/app-tap/string.test.lua

<snipped>

> @@ -304,70 +304,70 @@ test:test("unicode", function(test)

<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.

<snipped>

> -- 
> 2.23.0
> 

-- 
Best regards,
IM

  reply	other threads:[~2020-05-29 11:16 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-12  9:49 [Tarantool-patches] [PATCH v5 00/10] Add static analysis with luacheck sergeyb
2020-05-12  9:49 ` [Tarantool-patches] [PATCH v5 01/10] Add initial luacheck config sergeyb
2020-05-26 22:15   ` Igor Munkin
2020-05-28 15:31     ` Sergey Bronnikov
2020-05-28 16:07       ` Sergey Bronnikov
2020-05-29 11:20         ` Igor Munkin
2020-11-10 14:30           ` Sergey Bronnikov
2020-11-10 14:49             ` Igor Munkin
2020-05-12  9:49 ` [Tarantool-patches] [PATCH v5 02/10] gitlab-ci: enable static analysis with luacheck sergeyb
2020-05-13 14:15   ` Alexander V. Tikhonov
2020-05-13 14:40     ` Sergey Bronnikov
2020-05-26 22:39   ` Igor Munkin
2020-05-28 10:03     ` Sergey Bronnikov
2020-05-12  9:49 ` [Tarantool-patches] [PATCH v5 03/10] Fix luacheck warnings in extra/dist/tarantoolctl.in sergeyb
2020-05-26 23:11   ` Igor Munkin
2020-05-28 10:13     ` Sergey Bronnikov
2020-05-12  9:49 ` [Tarantool-patches] [PATCH v5 04/10] Fix luacheck warnings in src/lua/ sergeyb
2020-05-27 11:22   ` Igor Munkin
2020-05-28 12:22     ` Sergey Bronnikov
2020-05-12  9:50 ` [Tarantool-patches] [PATCH v5 05/10] " sergeyb
2020-05-13 11:13   ` Sergey Bronnikov
2020-05-27 11:22   ` Igor Munkin
2020-05-12  9:50 ` [Tarantool-patches] [PATCH v5 06/10] Fix luacheck warnings in src/box/lua/ sergeyb
2020-05-27 16:54   ` Igor Munkin
2020-05-28 15:16     ` Sergey Bronnikov
2020-05-12  9:50 ` [Tarantool-patches] [PATCH v5 07/10] " sergeyb
2020-05-13 11:14   ` Sergey Bronnikov
2020-05-27 16:54   ` Igor Munkin
2020-05-28 11:19     ` Sergey Bronnikov
2020-05-12  9:50 ` [Tarantool-patches] [PATCH v5 08/10] Fix luacheck warnings in test/ sergeyb
2020-05-29 11:08   ` Igor Munkin [this message]
2020-05-29 14:08     ` Sergey Bronnikov
2020-05-12  9:50 ` [Tarantool-patches] [PATCH v5 09/10] Add luacheck supressions for luajit tests sergeyb
2020-05-26 20:45   ` Igor Munkin
2020-05-28 19:25     ` Sergey Bronnikov
2020-05-12 12:28 ` [Tarantool-patches] [PATCH 10/10] build: Enable 'make luacheck' target Sergey Bronnikov
2020-05-26 20:45   ` Igor Munkin
2020-05-28  9:59     ` Sergey Bronnikov
2020-05-26 20:38 ` [Tarantool-patches] [PATCH v5 11/10] test: fix warnings spotted by luacheck sergeyb

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200529110800.GD21558@tarantool.org \
    --to=imun@tarantool.org \
    --cc=alexander.turenko@tarantool.org \
    --cc=o.piskunov@tarantool.org \
    --cc=sergeyb@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH v5 08/10] Fix luacheck warnings in test/' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox