From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id C54FA2434E for ; Thu, 24 Jan 2019 16:27:04 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id i6E2SeRK87ye for ; Thu, 24 Jan 2019 16:27:04 -0500 (EST) Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 7CAEA2422F for ; Thu, 24 Jan 2019 16:27:04 -0500 (EST) Subject: [tarantool-patches] Re: [PATCH v2 3/3] lua-yaml: treat an empty document/value as null References: From: Vladislav Shpilevoy Message-ID: <0a841ae0-f03f-5406-5a2e-d3fc81843784@tarantool.org> Date: Fri, 25 Jan 2019 00:26:49 +0300 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: tarantool-patches@freelists.org, Alexander Turenko Thanks for the patch! On 22/01/2019 05:12, Alexander Turenko wrote: > It improves our compatibility with the YAML standard. > > yaml.encode('') result changed from > > --- > ... > > to > > --- '' > ... > > yaml.decode('') returns zero values count before, now it returns > box.NULL. yaml.decode('- ') returns {''} before, now {box.NULL}. > > This commit touches many tests and test result files, which use console, > without behaviour changes. It also adds two test cases to > app-tap/console.test.lua. Not sure if it makes sense listing factual changes here, because literally the same I see below and in "git diff --stat". > --- > test/app-tap/console.test.lua | 16 +- > test/app/fio.result | 2 +- > test/app/socket.result | 26 +- > test/box/access.result | 8 +- > test/box/role.result | 8 +- > test/box/sequence.result | 2 +- > test/vinyl/errinj_tx.result | 10 +- > test/vinyl/hermitage.result | 122 ++-- > test/vinyl/mvcc.result | 1066 +++++++++++++++---------------- > test/vinyl/mvcc.test.lua | 4 +- > test/vinyl/tx_conflict.result | 2 +- > test/vinyl/tx_conflict.test.lua | 2 +- > test/vinyl/tx_gap_lock.result | 189 +++--- > test/vinyl/tx_gap_lock.test.lua | 3 +- > test/vinyl/tx_serial.result | 2 +- > test/vinyl/tx_serial.test.lua | 2 +- > third_party/lua-yaml/lyaml.cc | 22 +- > 17 files changed, 747 insertions(+), 739 deletions(-) > > diff --git a/test/vinyl/mvcc.result b/test/vinyl/mvcc.result > index 1941744b9..db7fc8e83 100644 > --- a/test/vinyl/mvcc.result > +++ b/test/vinyl/mvcc.result > @@ -41,29 +41,29 @@ t = box.space.test > -- > c1:begin() > --- > -- > +- null How about to start returning nothing instead of returning null so as to do not change the tests (or at least make the diff smaller)? I see, that most of the diff is from txn_proxy, which always does return 'something'. You can change it so as to do not just return, but check if a result is not null, and only then return. Otherwise do nothing or empty return. I am sure it will work since space:get(), for example, still can return nothing (!= null), and this is why other tests didn't fail.