Tarantool development patches archive
 help / color / mirror / Atom feed
From: Alexander Turenko <alexander.turenko@tarantool.org>
To: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: tml <tarantool-patches@dev.tarantool.org>
Subject: Re: [Tarantool-patches] [PATCH v3 0/3] box/console: Fix multireturn and empty output
Date: Tue, 21 Jan 2020 18:16:42 +0300	[thread overview]
Message-ID: <20200121151641.cv2ka3t7cewbjsau@tkn_work_nb> (raw)
In-Reply-To: <20200120175950.28060-1-gorcunov@gmail.com>

Thanks!

There are several missed comments.

Cited from [1]:

> > From previous review (see [1]):
>
> > I propose to add a case with nils at the end as well as simple 1, 2, 3
> > multireturn.
>
> [1]: https://lists.tarantool.org/pipermail/tarantool-patches/2019-December/013326.html
>
> I meant '1, nil, nil, nil\n' or kinda. Your implementation (after the patch)
> works correctly: it does not cut trailing nils. I don't sure whether it is part
> of our contract, to be honest. But while we're tentative it is good to keep
> this property and add the test case.

Added:

diff --git a/test/app-tap/console_lua.test.lua b/test/app-tap/console_lua.test.lua
index 5848bdf69..3ed6aad97 100755
--- a/test/app-tap/console_lua.test.lua
+++ b/test/app-tap/console_lua.test.lua
@@ -111,6 +111,16 @@ local cases = {
         input       = '1, 2, nil, a',
         expected    = '1, 2, box.NULL, {\n  1,\n  2,\n  3\n}',
         cleanup     = 'a = nil',
+    }, {
+        name        = 'trailing nils, line mode',
+        opts        = {block = false},
+        input       = '1, nil, nil, nil',
+        expected    = '1, box.NULL, box.NULL, box.NULL',
+    }, {
+        name        = 'trailing nils, block mode',
+        opts        = {block = true},
+        input       = '1, nil, nil, nil',
+        expected    = '1, box.NULL, box.NULL, box.NULL',
     }, {
         name        = 'empty output',
         input       = '\\set output',

Cited from [2]:

> > test/app-tap: add console_lua test
>
> Nit: we often use 'test:' prefix and it is useful for searching /
> excluding of such commits. I would use it here too.
>
> >
> > Test multireturn and empty output in lua mode.
>
> Nit: I would say "lack of a parameter of '\set output' command" or at
> least "empty output format", because 'empty output' is hard to
> understand w/o looking into previous commits.

Changed to:

 | test: add app-tap/console_lua test
 |
 | Test multireturn in lua output mode and lack of a parameter in '\set
 | output <...>' command.
 |
 | Co-developed-by: Alexander Turenko <alexander.turenko@tarantool.org>
 | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
 | Reviewed-by: Alexander Turenko <alexander.turenko@tarantool.org>

I don't think that a second review is necessary for those patches, they are
simple.

Pushed to master, 2.3, 2.2. CCed Kirill.

[1]: https://lists.tarantool.org/pipermail/tarantool-patches/2020-January/013595.html
[2]: https://lists.tarantool.org/pipermail/tarantool-patches/2020-January/013672.html

WBR, Alexander Turenko.

On Mon, Jan 20, 2020 at 08:59:47PM +0300, Cyrill Gorcunov wrote:
> In v3 nits for tests are fixed.
> 
> The issues are
> 
> https://github.com/tarantool/tarantool/issues/4604
> https://github.com/tarantool/tarantool/issues/4638
> 
> Branch
> 
> gorcunov/console-fixes-3
> 
> Cyrill Gorcunov (3):
>   box/console: handle multireturn in lua mode
>   box/console: handle empty output format
>   test/app-tap: add console_lua test
> 
>  src/box/lua/console.lua           |  41 ++++++---
>  test/app-tap/console_lua.test.lua | 141 ++++++++++++++++++++++++++++++
>  2 files changed, 169 insertions(+), 13 deletions(-)
>  create mode 100755 test/app-tap/console_lua.test.lua
> 
> -- 
> 2.20.1
> 

  parent reply	other threads:[~2020-01-21 15:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-20 17:59 Cyrill Gorcunov
2020-01-20 17:59 ` [Tarantool-patches] [PATCH v3 1/3] box/console: handle multireturn in lua mode Cyrill Gorcunov
2020-01-20 17:59 ` [Tarantool-patches] [PATCH v3 2/3] box/console: handle empty output format Cyrill Gorcunov
2020-01-20 17:59 ` [Tarantool-patches] [PATCH v3 3/3] test/app-tap: add console_lua test Cyrill Gorcunov
2020-01-21 15:16 ` Alexander Turenko [this message]
2020-01-21 15:27   ` [Tarantool-patches] [PATCH v3 0/3] box/console: Fix multireturn and empty output Cyrill Gorcunov

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=20200121151641.cv2ka3t7cewbjsau@tkn_work_nb \
    --to=alexander.turenko@tarantool.org \
    --cc=gorcunov@gmail.com \
    --cc=tarantool-patches@dev.tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH v3 0/3] box/console: Fix multireturn and empty output' \
    /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