diff options
author | Daniel Shahaf <danielsh@apache.org> | 2019-12-31 17:52:22 +0000 |
---|---|---|
committer | Daniel Shahaf <danielsh@apache.org> | 2020-01-01 13:56:04 +0000 |
commit | ac964897f41c20d63f6915ccc4b076407f10a391 (patch) | |
tree | ec323d739aa365b4c6e70ad300ffa591abfd81c2 /Test/D04parameter.ztst | |
parent | 9432d9b1cf8a9388eab05c59abf641c2b17fa0d1 (diff) | |
download | zsh-ac964897f41c20d63f6915ccc4b076407f10a391.tar.gz zsh-ac964897f41c20d63f6915ccc4b076407f10a391.tar.xz zsh-ac964897f41c20d63f6915ccc4b076407f10a391.zip |
unposted: Add some tests for ${(S)}, including a regression test for workers/45164.
Diffstat (limited to 'Test/D04parameter.ztst')
-rw-r--r-- | Test/D04parameter.ztst | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Test/D04parameter.ztst b/Test/D04parameter.ztst index 899b8f498..f4af5d59c 100644 --- a/Test/D04parameter.ztst +++ b/Test/D04parameter.ztst @@ -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 |