diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2008-06-12 13:45:04 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2008-06-12 13:45:04 +0000 |
commit | 8a4af211c346fd00ded0bb1b1384ca1514ed84e0 (patch) | |
tree | 50d303b3dfe084ab5d660d2e17eed0646ab5a277 /Test/C01arith.ztst | |
parent | c17b4c8d77c7a2ec52168f471a262023ed2e437d (diff) | |
download | zsh-8a4af211c346fd00ded0bb1b1384ca1514ed84e0.tar.gz zsh-8a4af211c346fd00ded0bb1b1384ca1514ed84e0.tar.xz zsh-8a4af211c346fd00ded0bb1b1384ca1514ed84e0.zip |
25149: add C_PRECEDENCES option to make arithmetic have C/Perl precedence
Diffstat (limited to 'Test/C01arith.ztst')
-rw-r--r-- | Test/C01arith.ztst | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Test/C01arith.ztst b/Test/C01arith.ztst index 4e3585fd4..5179948bd 100644 --- a/Test/C01arith.ztst +++ b/Test/C01arith.ztst @@ -43,6 +43,16 @@ 0:precedence (arithmetic) >1591 + fn() { + setopt localoptions c_precedences + integer i + (( i = 4 - - 3 * 7 << 1 & 7 ^ 1 | 16 ** 2 )) + print $i + } + fn +0:precedence (arithmetic, with C_PRECEDENCES) +>259 + print $(( 1 < 2 || 2 < 2 && 3 > 4 )) 0:precedence (logical) >1 |