about summary refs log tree commit diff
path: root/Test/C02cond.ztst
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-01-10 18:53:49 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-01-10 18:53:49 +0000
commitb24d545294507a5af5a63880282247042d934c9e (patch)
tree5ac137d80b21f2381cff5eba0dbdb325ae9aa444 /Test/C02cond.ztst
parented5c4c8e53fce85c1f450c6493b888e4dc223dcf (diff)
downloadzsh-b24d545294507a5af5a63880282247042d934c9e.tar.gz
zsh-b24d545294507a5af5a63880282247042d934c9e.tar.xz
zsh-b24d545294507a5af5a63880282247042d934c9e.zip
users/12412: check for extra arguments in test and [
Diffstat (limited to 'Test/C02cond.ztst')
-rw-r--r--Test/C02cond.ztst26
1 files changed, 25 insertions, 1 deletions
diff --git a/Test/C02cond.ztst b/Test/C02cond.ztst
index 0057e3a10..ff5afeb08 100644
--- a/Test/C02cond.ztst
+++ b/Test/C02cond.ztst
@@ -199,7 +199,31 @@ F:Failures in these cases do not indicate a problem in the shell.
 0:strings with `[' builtin
 
   [ `echo 0` -lt `echo 1` ]
-0:substituion in `[' builtin
+0:substitution in `[' builtin
+
+  [ -n foo scrimble ]
+1:argument checking for [ builtin
+?(eval):[:1: too many arguments
+
+  test -n foo scramble
+1:argument checking for test builtin
+?(eval):test:1: too many arguments
+
+  [ -n foo scrimble scromble ]
+1:argument checking for [ builtin
+?(eval):[:1: too many arguments
+
+  test -n foo scramble scrumble
+1:argument checking for test builtin
+?(eval):test:1: too many arguments
+
+  [ -n foo -a -n bar scrimble ]
+1:argument checking for [ builtin
+?(eval):[:1: too many arguments
+
+  test -n foo -a -z "" scramble
+1:argument checking for test builtin
+?(eval):test:1: too many arguments
 
   fn() {
     # careful: first file must exist to trigger bug