summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2012-12-05 13:51:01 +0000
committerPádraig Brady <P@draigBrady.com>2012-12-06 09:37:17 +0000
commit64b8751813234b49277296a2f9bfbc64a5676274 (patch)
treef503996e60f073c4bf26ad09da058ab596ee27fd
parentdd3193cd959684837b50d1aea8931a4c62ce2673 (diff)
downloadcoreutils-64b8751813234b49277296a2f9bfbc64a5676274.tar.xz
tests: cut.pl: adjust for changed diagnostic
* tests/misc/cut.pl: Since we now output the more complete error message irrespective of running in a multi-byte locale or not, adjust the test accordingly.
-rwxr-xr-xtests/misc/cut.pl14
1 files changed, 1 insertions, 13 deletions
diff --git a/tests/misc/cut.pl b/tests/misc/cut.pl
index aff0cbe10..a402a7586 100755
--- a/tests/misc/cut.pl
+++ b/tests/misc/cut.pl
@@ -30,7 +30,7 @@ my $mb_locale = $ENV{LOCALE_FR_UTF8};
my $prog = 'cut';
my $try = "Try '$prog --help' for more information.\n";
my $from_1 = "$prog: fields and positions are numbered from 1\n$try";
-my $inval = "$prog: invalid byte or field list\n$try";
+my $inval = "$prog: invalid byte, character or field list\n$try";
my $no_endpoint = "$prog: invalid range with no endpoint: -\n$try";
my $nofield = "$prog: an input delimiter may be specified only when " .
"operating on fields\n$try";
@@ -195,18 +195,6 @@ if ($mb_locale ne 'C')
my @new_t = @$t;
my $test_name = shift @new_t;
- # Depending on whether cut is multi-byte-patched,
- # it emits different diagnostics:
- # non-MB: invalid byte or field list
- # MB: invalid byte, character or field list
- # Adjust the expected error output accordingly.
- if (grep {ref $_ eq 'HASH' && exists $_->{ERR} && $_->{ERR} eq $inval}
- (@new_t))
- {
- my $sub = {ERR_SUBST => 's/, character//'};
- push @new_t, $sub;
- push @$t, $sub;
- }
push @new, ["$test_name-mb", @new_t, {ENV => "LC_ALL=$mb_locale"}];
}
push @Tests, @new;