diff options
author | Peter Stephenson <pws@zsh.org> | 2015-02-16 17:16:57 +0000 |
---|---|---|
committer | Peter Stephenson <pws@zsh.org> | 2015-02-16 17:16:57 +0000 |
commit | 126fb61c7c48edb19b9d771e4e517cef710f8bf1 (patch) | |
tree | aedae1b813cb2910a9b62b6a28d0b30268a6c3ff /Test | |
parent | 041a85243eb6d32e1cd1dc9f11a510c79e151433 (diff) | |
download | zsh-126fb61c7c48edb19b9d771e4e517cef710f8bf1.tar.gz zsh-126fb61c7c48edb19b9d771e4e517cef710f8bf1.tar.xz zsh-126fb61c7c48edb19b9d771e4e517cef710f8bf1.zip |
34560: Fix $(( that's actually a multiline cmd subst.
Diffstat (limited to 'Test')
-rw-r--r-- | Test/C01arith.ztst | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Test/C01arith.ztst b/Test/C01arith.ztst index ea87af257..09c08224e 100644 --- a/Test/C01arith.ztst +++ b/Test/C01arith.ztst @@ -318,3 +318,38 @@ # 0.75 is exactly representable, don't expect rounding error. >0 >0.75 + + # The following tests for a bug that only happens when + # backing up over input read a line at a time, so we'll + # read the input from stdin. + $ZTST_testdir/../Src/zsh -f <<<' + print $((echo first command + ); echo second command) + print third command + ' +0:Backing up a line of input when finding out it's not arithmetic +>first command second command +>third command + + $ZTST_testdir/../Src/zsh -f <<<' + print $((3 + + 4)) + print next line + ' +0:Not needing to back up a line when reading multiline arithmetic +>7 +>next line + + $ZTST_testdir/../Src/zsh -f <<<' + print $((case foo in + bar) + echo not this no, no + ;; + foo) + echo yes, this one + ;; + esac) + print after case in subshell) + ' +0:Non-arithmetic subst with command subsitution parse from hell +>yes, this one after case in subshell |