1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-27 16:50:58 +01:00

23115: ";|" at end of case clause causes later patterns to be tested

This commit is contained in:
Peter Stephenson 2007-01-19 21:36:00 +00:00
parent a5729be835
commit de272e0309
8 changed files with 101 additions and 29 deletions

View file

@ -413,6 +413,29 @@
0:`case' with braces
>schmavo
for word in artichoke bladderwort chrysanthemum Zanzibar
case $word in
(*der*) print $word contains the forbidden incantation der
;;
(a*) print $word begins with a
;&
([[:upper:]]*) print $word either begins with a or an upper case letter
;|
([[:lower:]]*) print $word begins with a lower case letter
;|
(*e*) print $word contains an e
;;
esac
0:`case' with mixed ;& and ;|
>artichoke begins with a
>artichoke either begins with a or an upper case letter
>artichoke begins with a lower case letter
>artichoke contains an e
>bladderwort contains the forbidden incantation der
>chrysanthemum begins with a lower case letter
>chrysanthemum contains an e
>Zanzibar either begins with a or an upper case letter
print 'This test hangs the shell when it fails...' >&8
name=0
# The number 4375 here is chosen to produce more than 16384 bytes of output