From b24d545294507a5af5a63880282247042d934c9e Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Thu, 10 Jan 2008 18:53:49 +0000 Subject: users/12412: check for extra arguments in test and [ --- Test/C02cond.ztst | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'Test') 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 -- cgit 1.4.1