]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Standardize on the diagnostics given when someone gives
authorJim Meyering <jim@meyering.net>
Mon, 21 Jun 2004 15:01:54 +0000 (15:01 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 21 Jun 2004 15:01:54 +0000 (15:01 +0000)
too few operands ("missing operand after `xxx'") or
too many operands ("extra operand `xxx'").
Include "quote.h" and/or "error.h" if it wasn't already being included.
(beyond, main): Likewise.

src/test.c

index ee8351addfcef85f33eca83cf5a691903d233376..105b29359e5280d5eee2c85d1fb2a646c85cc892 100644 (file)
@@ -43,6 +43,7 @@
 #include "system.h"
 #include "error.h"
 #include "euidaccess.h"
+#include "quote.h"
 
 #ifndef _POSIX_VERSION
 # include <sys/param.h>
@@ -199,7 +200,7 @@ advance (int f)
 static void
 beyond (void)
 {
-  test_syntax_error (_("argument expected\n"), NULL);
+  test_syntax_error (_("missing argument after %s"), quote (argv[argc - 1]));
 }
 
 /* Syntax error for when an integer argument was expected, but
@@ -1116,7 +1117,7 @@ main (int margc, char **margv)
   value = posixtest (argc - 1);
 
   if (pos != argc)
-    test_syntax_error (_("too many arguments\n"), NULL);
+    test_syntax_error (_("extra argument %s"), quote (argv[pos]));
 
   test_exit (SHELL_BOOLEAN (value));
 }