[Tarantool-patches] [PATCH luajit] test: add test for `string.char('%c', 0)`
sergos
sergos at tarantool.org
Thu Feb 2 10:01:10 MSK 2023
Hi!
LGTM with fixes proposed by Max.
Sergos
> On 19 Jan 2023, at 19:23, Sergey Kaplun <skaplun at tarantool.org> wrote:
>
> This patch adds the test for the commit
> 430d9f8f7ebb779948dbd43944b876b1a3f58551 ("Fix string.format("%c",
> 0)."). Although, the issue affects 2.0 branch only, there is no need to
> fix it. Nevertheless, the test is required to avoid regressions in the
> future.
>
> Part of tarantool/tarantool#8069
> ---
>
> PR: https://github.com/tarantool/tarantool/pull/8189
> Branch: https://github.com/tarantool/luajit/tree/skaplun/lj-378-string-format-c-null-char-full-ci
> Issues:
> * https://github.com/tarantool/tarantool/issues/8069
> * https://github.com/LuaJIT/LuaJIT/issues/378
>
> .../lj-378-string-format-c-null-char.test.lua | 11 +++++++++++
> 1 file changed, 11 insertions(+)
> create mode 100644 test/tarantool-tests/lj-378-string-format-c-null-char.test.lua
>
> diff --git a/test/tarantool-tests/lj-378-string-format-c-null-char.test.lua b/test/tarantool-tests/lj-378-string-format-c-null-char.test.lua
> new file mode 100644
> index 00000000..15cefadf
> --- /dev/null
> +++ b/test/tarantool-tests/lj-378-string-format-c-null-char.test.lua
> @@ -0,0 +1,11 @@
> +local tap = require('tap')
> +
> +local test = tap.test('lj-378-string-format-c-null-char')
> +test:plan(1)
> +
> +-- Test file to check that there is no regression in
> +-- `string.format('%c', 0)` behaviour.
> +-- See also https://github.com/LuaJIT/LuaJIT/issues/378.
> +
> +test:is(string.format('%c', 0), '\0', 'string.format %c on null char')
> +os.exit(test:check() and 0 or 1)
> --
> 2.34.1
>
More information about the Tarantool-patches
mailing list