39599: Don't reset status before "case" execution

This commit is contained in:
Peter Stephenson 2016-10-10 10:55:48 +01:00
parent b4cc190db9
commit 8f2ce89a0c
3 changed files with 13 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2016-10-10 Peter Stephenson <p.stephenson@samsung.com>
* 39599: Src/loop.c, Test/A01grammar.ztst: Don't reset status
before "case" execution.
2016-10-07 Daniel Shahaf <d.s@daniel.shahaf.name>
* 39522: Doc/Zsh/contrib.yo: add-zsh-hook/add-zle-hook-widget:

View File

@ -592,7 +592,6 @@ execcase(Estate state, int do_exec)
word = ecgetstr(state, EC_DUP, NULL);
singsub(&word);
untokenize(word);
lastval = 0;
cmdpush(CS_CASE);
while (state->pc < end) {

View File

@ -757,6 +757,14 @@
>}
>Stuff here
(exit 37)
case $? in
(37) echo $?
;;
esac
0:case retains exit status for execution of cases
>37
x=1
x=2 | echo $x
echo $x