From: Sergey Kaplun via Tarantool-patches <tarantool-patches@dev.tarantool.org> To: Igor Munkin <imun@tarantool.org>, Sergey Ostanevich <sergos@tarantool.org> Cc: tarantool-patches@dev.tarantool.org Subject: [Tarantool-patches] [PATCH luajit 1/3] test: fix path storage for non-concatable objects Date: Thu, 9 Sep 2021 10:03:17 +0300 [thread overview] Message-ID: <0d207e1a15360109e1e9c4bb775248f0fc04edc6.1631170629.git.skaplun@tarantool.org> (raw) In-Reply-To: <cover.1631170629.git.skaplun@tarantool.org> When the key of a table to compare via `tap.test:is_deeply()` is non-concatable object (i.e. lightuserdata) concatenation with path raises an error. This patch converts object to string to avoid this error. Needed for tarantool/tarantool#5629 --- test/tarantool-tests/tap.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/tarantool-tests/tap.lua b/test/tarantool-tests/tap.lua index 44fcac3d..a1f54d20 100644 --- a/test/tarantool-tests/tap.lua +++ b/test/tarantool-tests/tap.lua @@ -166,7 +166,7 @@ local function is_deeply(test, got, expected, message, extra) for k, v in pairs(got) do has[k] = true - extra.path = path .. "." .. k + extra.path = path .. "." .. tostring(k) if not cmpdeeply(v, expected[k], extra) then return false end @@ -175,7 +175,7 @@ local function is_deeply(test, got, expected, message, extra) -- Check if expected contains more keys then got. for k, v in pairs(expected) do if has[k] ~= true and (extra.strict or v ~= NULL) then - extra.path = path .. "." .. k + extra.path = path .. "." .. tostring(k) extra.expected = "key (exists): " .. tostring(k) extra.got = "key (missing): " .. tostring(k) return false -- 2.31.0
next prev parent reply other threads:[~2021-09-09 7:05 UTC|newest] Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-09-09 7:03 [Tarantool-patches] [PATCH luajit 0/3] Follow-up fixes for full 64-bit lightuserdata interning Sergey Kaplun via Tarantool-patches 2021-09-09 7:03 ` Sergey Kaplun via Tarantool-patches [this message] 2021-09-15 15:30 ` [Tarantool-patches] [PATCH luajit 1/3] test: fix path storage for non-concatable objects sergos via Tarantool-patches 2021-09-20 8:28 ` Sergey Kaplun via Tarantool-patches 2021-09-20 9:37 ` sergos via Tarantool-patches 2022-06-28 15:41 ` Igor Munkin via Tarantool-patches 2021-09-09 7:03 ` [Tarantool-patches] [PATCH luajit 2/3] Reorganize lightuserdata interning code Sergey Kaplun via Tarantool-patches 2021-09-15 15:30 ` sergos via Tarantool-patches 2021-09-20 8:32 ` Sergey Kaplun via Tarantool-patches 2021-09-20 9:37 ` sergos via Tarantool-patches 2022-06-28 15:42 ` Igor Munkin via Tarantool-patches 2021-09-09 7:03 ` [Tarantool-patches] [PATCH luajit 3/3] Avoid conflict between 64 bit lightuserdata and ITERN key Sergey Kaplun via Tarantool-patches 2021-09-15 15:31 ` sergos via Tarantool-patches 2021-09-20 8:38 ` Sergey Kaplun via Tarantool-patches 2021-09-20 9:37 ` sergos via Tarantool-patches 2022-06-29 20:20 ` Igor Munkin via Tarantool-patches 2022-06-30 12:11 ` [Tarantool-patches] [PATCH luajit 0/3] Follow-up fixes for full 64-bit lightuserdata interning Igor Munkin via Tarantool-patches
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=0d207e1a15360109e1e9c4bb775248f0fc04edc6.1631170629.git.skaplun@tarantool.org \ --to=tarantool-patches@dev.tarantool.org \ --cc=imun@tarantool.org \ --cc=sergos@tarantool.org \ --cc=skaplun@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH luajit 1/3] test: fix path storage for non-concatable objects' \ /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