1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-25 17:20:25 +02:00

37364: "test" and "[" handling of parentheses.

If three arguments, need to prefer binary operators if possible.

Need to look for full string for parentheses.
This commit is contained in:
Peter Stephenson 2015-12-09 16:40:08 +00:00
parent 7f5b2f5709
commit 67877f6055
4 changed files with 50 additions and 8 deletions

View file

@ -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