mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2025-09-10 07:59:52 +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:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user