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

@@ -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',