summaryrefslogtreecommitdiffhomepage
path: root/tests/custom/03_stdlib/18_split
diff options
context:
space:
mode:
Diffstat (limited to 'tests/custom/03_stdlib/18_split')
-rw-r--r--tests/custom/03_stdlib/18_split4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/custom/03_stdlib/18_split b/tests/custom/03_stdlib/18_split
index e31ce78..5ee35a2 100644
--- a/tests/custom/03_stdlib/18_split
+++ b/tests/custom/03_stdlib/18_split
@@ -40,6 +40,9 @@ argument is neither a string nor a regular expression.
// leading and trailing empty substrings are retained
split("|abc|def|", "|"),
split(",foo;bar:", /[,;:]/),
+
+ // subject and split strings handle embedded \0
+ split("foo=1\0bar=2\0baz=3", "\0"),
]), "\n");
%}
-- End --
@@ -58,6 +61,7 @@ argument is neither a string nor a regular expression.
[ "foo", "bar", "", "baz" ]
[ "", "abc", "def", "" ]
[ "", "foo", "bar", "" ]
+[ "foo=1", "bar=2", "baz=3" ]
-- End --