diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2006-01-11 19:29:47 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2006-01-11 19:29:47 +0000 |
commit | bfbe450d321cc184e34e2adad6a08821660e4f04 (patch) | |
tree | b2232dc683543742db12b17d314980489c822f26 | |
parent | f9574570b3b55fe823d093ee771ded0a9c2a48c8 (diff) | |
download | coreutils-bfbe450d321cc184e34e2adad6a08821660e4f04.tar.xz |
(test_syntax_error): Append a newline. All callers
changed, except for the ones that didn't already append a newline.
-rw-r--r-- | src/test.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/test.c b/src/test.c index eb2000312..d6ae03611 100644 --- a/src/test.c +++ b/src/test.c @@ -90,6 +90,7 @@ test_syntax_error (char const *format, char const *arg) { fprintf (stderr, "%s: ", argv[0]); fprintf (stderr, format, arg); + fputc ('\n', stderr); fflush (stderr); test_exit (TEST_FAILURE); } @@ -157,7 +158,7 @@ find_int (char const *string) return number_start; } - test_syntax_error (_("invalid integer %s\n"), quote (string)); + test_syntax_error (_("invalid integer %s"), quote (string)); } /* Find the modification time of FILE, and stuff it into *MTIME. @@ -238,10 +239,10 @@ term (void) value = posixtest (nargs); if (argv[pos] == 0) - test_syntax_error (_("')' expected\n"), NULL); + test_syntax_error (_("')' expected"), NULL); else if (argv[pos][0] != ')' || argv[pos][1]) - test_syntax_error (_("')' expected, found %s\n"), argv[pos]); + test_syntax_error (_("')' expected, found %s"), argv[pos]); advance (false); } @@ -257,7 +258,7 @@ term (void) if (test_unop (argv[pos])) value = unary_operator (); else - test_syntax_error (_("%s: unary operator expected\n"), argv[pos]); + test_syntax_error (_("%s: unary operator expected"), argv[pos]); } else { @@ -326,7 +327,7 @@ binary_operator (bool l_is_l) bool le, re; pos += 3; if (l_is_l | r_is_l) - test_syntax_error (_("-nt does not accept -l\n"), NULL); + test_syntax_error (_("-nt does not accept -l"), NULL); le = get_mtime (argv[op - 1], <); re = get_mtime (argv[op + 1], &rt); return le && (!re || timespec_cmp (lt, rt) > 0); @@ -339,7 +340,7 @@ binary_operator (bool l_is_l) /* ef - hard link? */ pos += 3; if (l_is_l | r_is_l) - test_syntax_error (_("-ef does not accept -l\n"), NULL); + test_syntax_error (_("-ef does not accept -l"), NULL); return (stat (argv[op - 1], &stat_buf) == 0 && stat (argv[op + 1], &stat_spare) == 0 && stat_buf.st_dev == stat_spare.st_dev @@ -355,7 +356,7 @@ binary_operator (bool l_is_l) bool le, re; pos += 3; if (l_is_l | r_is_l) - test_syntax_error (_("-ot does not accept -l\n"), NULL); + test_syntax_error (_("-ot does not accept -l"), NULL); le = get_mtime (argv[op - 1], <); re = get_mtime (argv[op + 1], &rt); return re && (!le || timespec_cmp (lt, rt) < 0); @@ -364,7 +365,7 @@ binary_operator (bool l_is_l) } /* FIXME: is this dead code? */ - test_syntax_error (_("unknown binary operator\n"), argv[op]); + test_syntax_error (_("unknown binary operator"), argv[op]); } if (argv[op][0] == '=' && !argv[op][1]) @@ -602,7 +603,7 @@ two_arguments (void) if (test_unop (argv[pos])) value = unary_operator (); else - test_syntax_error (_("%s: unary operator expected\n"), argv[pos]); + test_syntax_error (_("%s: unary operator expected"), argv[pos]); } else beyond (); @@ -630,7 +631,7 @@ three_arguments (void) else if (STREQ (argv[pos + 1], "-a") || STREQ (argv[pos + 1], "-o")) value = expr (); else - test_syntax_error (_("%s: binary operator expected\n"), argv[pos+1]); + test_syntax_error (_("%s: binary operator expected"), argv[pos+1]); return (value); } @@ -827,7 +828,7 @@ main (int margc, char **margv) { parse_long_options (margc, margv, PROGRAM_NAME, GNU_PACKAGE, VERSION, usage, AUTHORS, (char const *) NULL); - test_syntax_error (_("missing `]'\n"), NULL); + test_syntax_error (_("missing `]'"), NULL); } --margc; |