mirror of
https://github.com/zsh-users/zsh
synced 2024-09-05 16:03:40 +00:00
unposted: Add some tests for ${(S)}, including a regression test for workers/45164.
This commit is contained in:
parent
9432d9b1cf
commit
ac964897f4
|
@ -1,5 +1,8 @@
|
|||
2020-01-01 Daniel Shahaf <danielsh@apache.org>
|
||||
|
||||
* unposted: Test/D04parameter.ztst: Add some tests for ${(S)},
|
||||
including a regression test for workers/45164.
|
||||
|
||||
* 45169/0002 (tweaked for trailing newlines): Etc/BUGS,
|
||||
Test/C03traps.ztst: Add an expected-to-fail test for
|
||||
workers/44007.
|
||||
|
|
|
@ -2625,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%%*}
|
||||
-f:(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
|
||||
|
|
Loading…
Reference in a new issue