diff options
| author | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2017-08-09 19:57:47 +0100 |
|---|---|---|
| committer | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2017-08-09 19:57:47 +0100 |
| commit | cfd34c75ac10e05a9573f6b26d3cb2d08b269f6a (patch) | |
| tree | 0fcf5d73fb8340638e25055c63415b8410ffe670 /Test | |
| parent | unposted: update to 5.4.1-dev-0 (diff) | |
| download | zsh-cfd34c75ac10e05a9573f6b26d3cb2d08b269f6a.tar zsh-cfd34c75ac10e05a9573f6b26d3cb2d08b269f6a.tar.gz zsh-cfd34c75ac10e05a9573f6b26d3cb2d08b269f6a.tar.bz2 zsh-cfd34c75ac10e05a9573f6b26d3cb2d08b269f6a.tar.lz zsh-cfd34c75ac10e05a9573f6b26d3cb2d08b269f6a.tar.xz zsh-cfd34c75ac10e05a9573f6b26d3cb2d08b269f6a.tar.zst zsh-cfd34c75ac10e05a9573f6b26d3cb2d08b269f6a.zip | |
41504: make empty strings work in case patterns with no leading parenthesis
Diffstat (limited to 'Test')
| -rw-r--r-- | Test/A01grammar.ztst | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/Test/A01grammar.ztst b/Test/A01grammar.ztst index 9625a15bc..0302c9624 100644 --- a/Test/A01grammar.ztst +++ b/Test/A01grammar.ztst @@ -820,6 +820,43 @@ 0:case keeps exit status of last command executed in compound-list >37 + case '' in + burble) print No. + ;; + spurble|) print Yes! + ;; + |burble) print Not quite. + ;; + esac + case '' in + burble) print No. + ;; + |burble) print Wow! + ;; + spurble|) print Sorry. + ;; + esac + case '' in + gurgle) print No. + ;; + wurgle||jurgle) print Yikes! + ;; + durgle|) print Hmm. + ;; + |zurgle) print Hah. + ;; + esac + case '' in + # Useless doubled empty string to check special case. + ||jurgle) print Ok. + ;; + esac +0: case with no opening parentheses and empty string +>Yes! +>Wow! +>Yikes! +>Ok. + x=1 x=2 | echo $x echo $x |
