diff options
Diffstat (limited to 'Test/D04parameter.ztst')
-rw-r--r-- | Test/D04parameter.ztst | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/Test/D04parameter.ztst b/Test/D04parameter.ztst index 6379c8cd0..71c79687f 100644 --- a/Test/D04parameter.ztst +++ b/Test/D04parameter.ztst @@ -179,9 +179,17 @@ print ${##} set 1 2 3 4 5 6 7 8 9 10 print ${##} -0:${##} is length of $# + print ${##""} + print ${##1} + print ${##2} + print ${###<->} # oh, for pete's sake... +0:${##} is length of $#, and other tales of hash horror >1 >2 +>10 +>0 +>10 +> array=(once bitten twice shy) print IF${array}THEN @@ -300,23 +308,16 @@ foo='\u65\123' print -r ${(g:o:)foo} - foo='\u65\0123' + foo='\u65\0123^X\C-x' print -r ${(g::)foo} - foo='\u65^X' - print -r ${(V)${(g:c:)foo}} - foo='\u65\C-x\M-a' - print -r ${(V)${(g:e:)foo}} - foo='\u65\123\C-x' - print -r ${(V)${(g:eo:)foo}} - foo=('\u65' '\0123' '^X\M-a') - print -r ${(V)${(g:e:)foo}} + foo='^X' + bar='\C-\130' + [[ ${(g:c:)foo} == ${(g:oe:)bar} ]] + echo $? 0:${(g)...} >eS ->eS ->e^X ->e^X\M-a ->eS^X ->e S ^X\M-a +>eS^X\C-x +>0 foo='I'\''m nearly out of my mind with tedium' bar=foo @@ -1452,3 +1453,8 @@ print ${foo:5:-6} 1:Regression test for total length < 0 in array ?(eval):2: substring expression: 3 < 5 + + foo=(${(0)"$(print -n)"}) + print ${#foo} +0:Nularg removed from split empty string +>0 |