From 3b7c9d1a31a183b903de9c1396a17b4ee64f09f8 Mon Sep 17 00:00:00 2001 From: Pádraig Brady Date: Thu, 25 Dec 2014 02:21:11 +0000 Subject: 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. --- gl/lib/xdectoint.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gl/lib') diff --git a/gl/lib/xdectoint.c b/gl/lib/xdectoint.c index 2164d1ef4..9ca128130 100644 --- a/gl/lib/xdectoint.c +++ b/gl/lib/xdectoint.c @@ -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)); } -- cgit v1.2.3-70-g09d2