From 1be52186b4aed40eb9fe295691932037ecf6c6ab Mon Sep 17 00:00:00 2001 From: Jun-ichi Takimoto Date: Fri, 2 Dec 2022 19:19:27 +0900 Subject: 51079: metafy sep in array subscript flag (s:sep:) this enable sep to contain \0 etc. --- Test/D06subscript.ztst | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Test/D06subscript.ztst') diff --git a/Test/D06subscript.ztst b/Test/D06subscript.ztst index adbd398c4..21127e641 100644 --- a/Test/D06subscript.ztst +++ b/Test/D06subscript.ztst @@ -294,3 +294,8 @@ F:Regression test for workers/42297 [[ ${a[$i]} = ${a[i]} ]] 0f:Math evaluation of commas in array subscripts F:In math, (($i)) should be the same as ((i)), see workers/47748. + + string=$'foo\0bar' + echo ${string[(pws:\0:)1]} +0:Word splitting by NUL +>foo -- cgit v1.2.3-70-g09d2