summaryrefslogtreecommitdiff
path: root/tests/fmt
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2014-12-25 02:21:11 +0000
committerPádraig Brady <P@draigBrady.com>2014-12-25 02:30:05 +0000
commit3b7c9d1a31a183b903de9c1396a17b4ee64f09f8 (patch)
treef4b4532d1cae9d08fdfd5d52bd38c60981e59c77 /tests/fmt
parent6894816c653adef54f3a85becbf75a865d6d39d6 (diff)
downloadcoreutils-3b7c9d1a31a183b903de9c1396a17b4ee64f09f8.tar.xz
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.
Diffstat (limited to 'tests/fmt')
-rwxr-xr-xtests/fmt/base.pl9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/fmt/base.pl b/tests/fmt/base.pl
index 8751119f1..e3e304034 100755
--- a/tests/fmt/base.pl
+++ b/tests/fmt/base.pl
@@ -19,6 +19,7 @@
use strict;
(my $program_name = $0) =~ s|.*/||;
+my $normalize_strerror = "s/': .*/'/";
my @Tests =
(
@@ -26,11 +27,11 @@ my @Tests =
{IN=> "ça\nçb\n"},
{OUT=>"ça b\n"}],
['wide-1', '-w 32768',
- {ERR => "fmt: invalid width: '32768'"}, {EXIT => 1},
- {ERR_SUBST => 's/:[^:]*$//'}],
+ {ERR => "fmt: invalid width: '32768'\n"}, {EXIT => 1},
+ {ERR_SUBST => $normalize_strerror}],
['wide-2', '-w 2147483647',
- {ERR => "fmt: invalid width: '2147483647'"}, {EXIT => 1},
- {ERR_SUBST => 's/:[^:]*$//'}],
+ {ERR => "fmt: invalid width: '2147483647'\n"}, {EXIT => 1},
+ {ERR_SUBST => $normalize_strerror}],
['bad-suffix', '-72x', {IN=> ''},
{ERR => "fmt: invalid width: '72x'\n"}, {EXIT => 1}],
['no-file', 'no-such-file',