summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2004-06-21 15:01:54 +0000
committerJim Meyering <jim@meyering.net>2004-06-21 15:01:54 +0000
commitf04e77d3648555db5977ed9809cdb9690ca96d75 (patch)
treeefc6e51544aa26087e026ebef08cdd9123898ca5 /src
parenta20574f431070a2d8d8a70d4b5e1b1ed9c12aedb (diff)
downloadcoreutils-f04e77d3648555db5977ed9809cdb9690ca96d75.tar.xz
Standardize on the diagnostics given when someone gives
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.
Diffstat (limited to 'src')
-rw-r--r--src/test.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/test.c b/src/test.c
index ee8351add..105b29359 100644
--- a/src/test.c
+++ b/src/test.c
@@ -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));
}