From cc9bc2dd0b90cbf920794f15d0fce73fe04babac Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Mon, 22 Nov 2010 11:42:47 +0000 Subject: 28424: new POSIX_STRINGS option --- Test/A03quoting.ztst | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'Test/A03quoting.ztst') 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 @@ > > > + + 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 -- cgit 1.4.1