diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2010-11-22 11:42:47 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2010-11-22 11:42:47 +0000 |
commit | cc9bc2dd0b90cbf920794f15d0fce73fe04babac (patch) | |
tree | bcf101de55b998fdf0f7eca2c7252e442952e1f2 /Test | |
parent | e6946adf57a44fe84781f20c395ba51bd39fd4d9 (diff) | |
download | zsh-cc9bc2dd0b90cbf920794f15d0fce73fe04babac.tar.gz zsh-cc9bc2dd0b90cbf920794f15d0fce73fe04babac.tar.xz zsh-cc9bc2dd0b90cbf920794f15d0fce73fe04babac.zip |
28424: new POSIX_STRINGS option
Diffstat (limited to 'Test')
-rw-r--r-- | Test/A03quoting.ztst | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Test/A03quoting.ztst b/Test/A03quoting.ztst index f0f86e0b2..0cf0e8a02 100644 --- a/Test/A03quoting.ztst +++ b/Test/A03quoting.ztst @@ -42,6 +42,7 @@ unsetopt rcquotes 0:Yes RC_QUOTES with single quotes >' +# ' Deconfuse Emacs quoting rules print '<\u0041>' printf '%s\n' $'<\u0042>' @@ -52,3 +53,24 @@ ><B> ><C> ><D> + + null1="$(print -r a$'b\0c'd)" + null2="$(setopt posixstrings; print -r a$'b\0c'd)" + for string in $null1 $null2; do + print ":" + for (( i = 1; i <= $#string; i++ )); do + char=$string[$i] + print $(( [#16] #char )) + done + done +0:Embedded null characters in $'...' strings. +>: +>16#61 +>16#62 +>16#0 +>16#63 +>16#64 +>: +>16#61 +>16#62 +>16#64 |