1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-04-21 11:16:16 +02:00

tests: fix error message check on some systems

http://hydra.nixos.org/build/18129583 identified (on OS X)
an incorrect test assumption in the previous commit.

* gl/lib/xdectoint.c (__xnumtoint): Suppress the EINVAL
error message as it's redundant in this context.
* tests/misc/tail.pl: Suppress _optionally_ appended
strerror messages.
* tests/fmt/base.pl: Likewise.
* tests/pr/pr-tests.pl: Likewise.
* tests/split/l-chunk.sh: Likewise.
This commit is contained in:
Pádraig Brady
2014-12-25 02:21:11 +00:00
parent 6894816c65
commit 3b7c9d1a31
5 changed files with 16 additions and 14 deletions

View File

@@ -65,7 +65,8 @@ __xnumtoint (const char *n_str, int base, __xdectoint_t min, __xdectoint_t max,
if (s_err != LONGINT_OK)
{
error (err_exit ? err_exit : EXIT_FAILURE, errno,
/* EINVAL error message is redundant in this context. */
error (err_exit ? err_exit : EXIT_FAILURE, errno == EINVAL ? 0 : errno,
"%s: %s", err, quote (n_str));
}