diff options
author | Oliver Kiddle <opk@zsh.org> | 2022-12-17 00:09:37 +0100 |
---|---|---|
committer | Oliver Kiddle <opk@zsh.org> | 2022-12-17 00:37:19 +0100 |
commit | 35a2f155c3b92e67957325e1f49e409546378e3e (patch) | |
tree | 7c4593cf459ae5067627043c7fba15866c48c8c6 /Test/B04read.ztst | |
parent | 2701ab161df1f259b8292a650a4ea5cebd668d81 (diff) | |
download | zsh-35a2f155c3b92e67957325e1f49e409546378e3e.tar.gz zsh-35a2f155c3b92e67957325e1f49e409546378e3e.zip |
51214: handle read -d and a delimiter that can't be decoded into a character
Terminate input at the raw byte value of the delimiter.
Also document and test the use of an empty string as a way to specify
NUL as the delimiter.
Diffstat (limited to 'Test/B04read.ztst')
-rw-r--r-- | Test/B04read.ztst | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Test/B04read.ztst b/Test/B04read.ztst index 96adf51c7..14bdaeef5 100644 --- a/Test/B04read.ztst +++ b/Test/B04read.ztst @@ -82,6 +82,10 @@ >Testing the >null hypothesis + read -ed '' <<<$'one\0two' +0:empty delimiter terminates at nulls +>one + print -n $'first line\x80second line\x80' | while read -d $'\x80' line; do print $line; done 0:read with a delimiter >= 0x80 |