* [Tarantool-patches] [PATCH luajit] test: add test for `string.char('%c', 0)`
@ 2023-01-19 16:23 Sergey Kaplun via Tarantool-patches
2023-01-24 15:26 ` Maxim Kokryashkin via Tarantool-patches
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Sergey Kaplun via Tarantool-patches @ 2023-01-19 16:23 UTC (permalink / raw)
To: Sergey Ostanevich, Maxim Kokryashkin; +Cc: tarantool-patches
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Tarantool-patches] [PATCH luajit] test: add test for `string.char('%c', 0)`
2023-01-19 16:23 [Tarantool-patches] [PATCH luajit] test: add test for `string.char('%c', 0)` Sergey Kaplun via Tarantool-patches
@ 2023-01-24 15:26 ` Maxim Kokryashkin via Tarantool-patches
2023-01-26 7:08 ` Sergey Kaplun via Tarantool-patches
2023-02-02 7:01 ` sergos via Tarantool-patches
2023-02-20 9:57 ` Igor Munkin via Tarantool-patches
2 siblings, 1 reply; 6+ messages in thread
From: Maxim Kokryashkin via Tarantool-patches @ 2023-01-24 15:26 UTC (permalink / raw)
To: Sergey Kaplun; +Cc: tarantool-patches
[-- Attachment #1: Type: text/plain, Size: 1699 bytes --]
Hi, Sergey!
Thanks for the patch!
LGTM, except for the single nit regarding the commit title.
I believe, it should be the `string.format` instead of `string.char`.
--
Best regards,
Maxim Kokryashkin
>
>>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
>
[-- Attachment #2: Type: text/html, Size: 2718 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Tarantool-patches] [PATCH luajit] test: add test for `string.char('%c', 0)`
2023-01-24 15:26 ` Maxim Kokryashkin via Tarantool-patches
@ 2023-01-26 7:08 ` Sergey Kaplun via Tarantool-patches
2023-01-26 14:39 ` Maxim Kokryashkin via Tarantool-patches
0 siblings, 1 reply; 6+ messages in thread
From: Sergey Kaplun via Tarantool-patches @ 2023-01-26 7:08 UTC (permalink / raw)
To: Maxim Kokryashkin; +Cc: tarantool-patches
Hi, Maxim!
Thanks for the review!
On 24.01.23, Maxim Kokryashkin wrote:
>
> Hi, Sergey!
> Thanks for the patch!
> LGTM, except for the single nit regarding the commit title.
> I believe, it should be the `string.format` instead of `string.char`.
Nice catch!
Fixed! Thanks!
Branch is force-pushed.
> --
> Best regards,
> Maxim Kokryashkin
>
>
> >
> >>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
> >
--
Best regards,
Sergey Kaplun
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Tarantool-patches] [PATCH luajit] test: add test for `string.char('%c', 0)`
2023-01-26 7:08 ` Sergey Kaplun via Tarantool-patches
@ 2023-01-26 14:39 ` Maxim Kokryashkin via Tarantool-patches
0 siblings, 0 replies; 6+ messages in thread
From: Maxim Kokryashkin via Tarantool-patches @ 2023-01-26 14:39 UTC (permalink / raw)
To: Sergey Kaplun; +Cc: tarantool-patches
[-- Attachment #1: Type: text/plain, Size: 2174 bytes --]
Hi, Sergey!
Thanks for the fixes!
LGTM
--
Best regards,
Maxim Kokryashkin
>
>>Hi, Maxim!
>>
>>Thanks for the review!
>>
>>On 24.01.23, Maxim Kokryashkin wrote:
>>>
>>> Hi, Sergey!
>>> Thanks for the patch!
>>> LGTM, except for the single nit regarding the commit title.
>>> I believe, it should be the `string.format` instead of `string.char`.
>>
>>Nice catch!
>>Fixed! Thanks!
>>Branch is force-pushed.
>>
>>> --
>>> Best regards,
>>> Maxim Kokryashkin
>>>
>>>
>>> >
>>> >>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
>>> >
>>
>>--
>>Best regards,
>>Sergey Kaplun
>
[-- Attachment #2: Type: text/html, Size: 3610 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Tarantool-patches] [PATCH luajit] test: add test for `string.char('%c', 0)`
2023-01-19 16:23 [Tarantool-patches] [PATCH luajit] test: add test for `string.char('%c', 0)` Sergey Kaplun via Tarantool-patches
2023-01-24 15:26 ` Maxim Kokryashkin via Tarantool-patches
@ 2023-02-02 7:01 ` sergos via Tarantool-patches
2023-02-20 9:57 ` Igor Munkin via Tarantool-patches
2 siblings, 0 replies; 6+ messages in thread
From: sergos via Tarantool-patches @ 2023-02-02 7:01 UTC (permalink / raw)
To: Sergey Kaplun; +Cc: tarantool-patches
Hi!
LGTM with fixes proposed by Max.
Sergos
> On 19 Jan 2023, at 19:23, Sergey Kaplun <skaplun@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
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Tarantool-patches] [PATCH luajit] test: add test for `string.char('%c', 0)`
2023-01-19 16:23 [Tarantool-patches] [PATCH luajit] test: add test for `string.char('%c', 0)` Sergey Kaplun via Tarantool-patches
2023-01-24 15:26 ` Maxim Kokryashkin via Tarantool-patches
2023-02-02 7:01 ` sergos via Tarantool-patches
@ 2023-02-20 9:57 ` Igor Munkin via Tarantool-patches
2 siblings, 0 replies; 6+ messages in thread
From: Igor Munkin via Tarantool-patches @ 2023-02-20 9:57 UTC (permalink / raw)
To: Sergey Kaplun; +Cc: tarantool-patches
Sergey,
I've checked the patch into all long-term branches in tarantool/luajit
and bumped a new version in master, 2.10 and 1.10.
On 19.01.23, Sergey Kaplun via Tarantool-patches 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
>
<snipped>
> --
> 2.34.1
>
--
Best regards,
IM
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-02-20 9:58 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-19 16:23 [Tarantool-patches] [PATCH luajit] test: add test for `string.char('%c', 0)` Sergey Kaplun via Tarantool-patches
2023-01-24 15:26 ` Maxim Kokryashkin via Tarantool-patches
2023-01-26 7:08 ` Sergey Kaplun via Tarantool-patches
2023-01-26 14:39 ` Maxim Kokryashkin via Tarantool-patches
2023-02-02 7:01 ` sergos via Tarantool-patches
2023-02-20 9:57 ` Igor Munkin via Tarantool-patches
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox