about summary refs log tree commit diff
path: root/Test/C02cond.ztst
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2015-12-09 16:40:08 +0000
committerPeter Stephenson <pws@zsh.org>2015-12-09 16:40:08 +0000
commit67877f60552019226e93f56b108f7b61a60ea11b (patch)
tree49d506564c9eddecedbe4a8e056098676ad99a96 /Test/C02cond.ztst
parent7f5b2f570961cd9b20f322d7f45318878a1a4b29 (diff)
downloadzsh-67877f60552019226e93f56b108f7b61a60ea11b.tar.gz
zsh-67877f60552019226e93f56b108f7b61a60ea11b.tar.xz
zsh-67877f60552019226e93f56b108f7b61a60ea11b.zip
37364: "test" and "[" handling of parentheses.
If three arguments, need to prefer binary operators if possible.

Need to look for full string for parentheses.
Diffstat (limited to 'Test/C02cond.ztst')
-rw-r--r--Test/C02cond.ztst12
1 files changed, 12 insertions, 0 deletions
diff --git a/Test/C02cond.ztst b/Test/C02cond.ztst
index 40bbf424a..9e1369689 100644
--- a/Test/C02cond.ztst
+++ b/Test/C02cond.ztst
@@ -389,6 +389,18 @@ F:Failures in these cases do not indicate a problem in the shell.
 >Not zero 5
 >Not zero 6
 
+  [ '(' = ')' ] || print OK 1
+  [ '((' = '))' ] || print OK 2
+  [ '(' = '(' ] && print OK 3
+  [ '(' non-empty-string ')' ] && echo OK 4
+  [ '(' '' ')' ] || echo OK 5
+0:yet more old-fashioned test fix ups: prefer comparison to parentheses
+>OK 1
+>OK 2
+>OK 3
+>OK 4
+>OK 5
+
 %clean
   # This works around a bug in rm -f in some versions of Cygwin
   chmod 644 unmodish