diff options
Diffstat (limited to 'Test/D04parameter.ztst')
-rw-r--r-- | Test/D04parameter.ztst | 95 |
1 files changed, 94 insertions, 1 deletions
diff --git a/Test/D04parameter.ztst b/Test/D04parameter.ztst index c91af1a9c..76f3e77a1 100644 --- a/Test/D04parameter.ztst +++ b/Test/D04parameter.ztst @@ -640,6 +640,74 @@ >echo >$(|||) bar + argv=( + $'a=() b=()' + $'a=(foo) b=(bar)' + $'a=(foo) b=() c=() d=(bar) e=(baz) f=() g=()' + $'a=(foo) b=() c=() d=(bar)\ne=(baz) f=() g=()' + $'a=(foo) b=() d=(bar)' + ) + for 1; print -rl -- ${(z)1} && print +0:${(z)} regression test: multiple array assignments +>a=( +>) +>b=( +>) +> +>a=( +>foo +>) +>b=( +>bar +>) +> +>a=( +>foo +>) +>b=( +>) +>c=( +>) +>d=( +>bar +>) +>e=( +>baz +>) +>f=( +>) +>g=( +>) +> +>a=( +>foo +>) +>b=( +>) +>c=( +>) +>d=( +>bar +>) +>; +>e=( +>baz +>) +>f=( +>) +>g=( +>) +> +>a=( +>foo +>) +>b=( +>) +>d=( +>bar +>) +> + foo=$'\x06ZUI\x1f text-field example: \x1azuitfieldtfield1_1\x1a\'\'\x1a\'\'\x1a1\x1aZUI\\[my_tfield1_width\\]\x1aZUI\\[my_tfield1_start\\]\x1aZUI\\[my_tfield1_data\\]\x1c' print "${#${(z@)foo}}" 0:Test real-world data that once seemed to fail @@ -2444,7 +2512,7 @@ F:behavior, see http://austingroupbugs.net/view.php?id=888 local -a x : <<< ${(F)x/y} } -0:Separation / join logic regresssion test +0:Separation / join logic regression test testpath=/one/two/three/four for (( i = 0; i <= 6; ++i )); do @@ -2557,3 +2625,28 @@ F:behavior, see http://austingroupbugs.net/view.php?id=888 print ${foo%%*} 0:Largest match at end matches entire string > + + foo=pws + print 1: ${(S)foo#*} + print 2: ${(S)foo##*} + print 3: ${(S)foo#?} + print 4: ${(S)foo##?} +0:(S) with zero-length matches at start +>1: pws +>2: +>3: ws +>4: ws + + foo=pws + print 2: ${(S)foo%%*} +0:(S) with zero-length matches at end, part 1 (workers/45164) +>2: pws + + foo=pws + print 1: ${(S)foo%*} + print 3: ${(S)foo%?} + print 4: ${(S)foo%%?} +0:(S) with zero-length matches at end, part 2 +>1: pws +>3: pw +>4: pw |