summaryrefslogtreecommitdiff
path: root/tests/pr/pr-tests.pl
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pr/pr-tests.pl')
-rwxr-xr-xtests/pr/pr-tests.pl11
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/pr/pr-tests.pl b/tests/pr/pr-tests.pl
index 10947ac9..575943f4 100755
--- a/tests/pr/pr-tests.pl
+++ b/tests/pr/pr-tests.pl
@@ -1,7 +1,7 @@
#!/usr/bin/perl
# Test pr.
-# Copyright (C) 2008-2014 Free Software Foundation, Inc.
+# Copyright (C) 2008-2015 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,6 +22,7 @@ use strict;
@ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
my $prog = 'pr';
+my $normalize_strerror = "s/': .*/'/";
my @tv = (
@@ -385,9 +386,9 @@ my @tv = (
['col-long', '-W3 -t -1 --columns=2', "a\nb\nc\n", "a c\nb\n", 0],
# Make sure these fail.
['col-0', '-0', '', '', 1,
- "$prog: invalid number of columns: '0'\n"],
+ "$prog: invalid number of columns: '0'\n", $normalize_strerror],
['col-inval', '-'.'9'x100, '', '', 1,
- "$prog: invalid number of columns: '". ('9'x100) ."'\n"],
+ "$prog: invalid number of columns: '". ('9'x100) ."'\n", $normalize_strerror],
# Before coreutils-5.3.1, --pages=1:-1 would be treated like
# --pages=1:18446744073709551615.
@@ -427,7 +428,7 @@ my $common_option_prefix = '--date-format="-- Date/Time --" -h x';
my @Tests;
foreach my $t (@tv)
{
- my ($test_name, $flags, $in, $exp, $ret, $err_msg) = @$t;
+ my ($test_name, $flags, $in, $exp, $ret, $err_msg, $err_sub) = @$t;
my $new_ent = [$test_name, $common_option_prefix, $flags];
if (!ref $in)
{
@@ -454,7 +455,7 @@ foreach my $t (@tv)
}
}
$ret
- and push @$new_ent, {EXIT=>$ret}, {ERR=>$err_msg};
+ and push @$new_ent, {EXIT=>$ret}, {ERR=>$err_msg}, {ERR_SUBST=>$err_sub};
push @Tests, $new_ent;
}