From: Jim Meyering Date: Mon, 21 Jun 2004 15:01:54 +0000 (+0000) Subject: Standardize on the diagnostics given when someone gives X-Git-Tag: v5.3.0~1290 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f04e77d3648555db5977ed9809cdb9690ca96d75;p=thirdparty%2Fcoreutils.git 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. --- diff --git a/src/test.c b/src/test.c index ee8351addf..105b29359e 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 @@ -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)); }