summaryrefslogtreecommitdiff
path: root/tests/misc/expr.pl
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2017-09-20 22:12:20 -0700
committerPádraig Brady <P@draigBrady.com>2017-09-20 22:21:31 -0700
commit3a3f5f359eb1ca621ea9630bad032e875e116944 (patch)
treeb981b44f65cb88eab83f45e161c2d559a8213759 /tests/misc/expr.pl
parent454d7f31c5ae1666617fd15c56f919c9b3f585ca (diff)
downloadcoreutils-3a3f5f359eb1ca621ea9630bad032e875e116944.tar.gz
tests: avoid a false failure in expr test with UTF8
* tests/misc/expr.pl: Skip the quote varying tests in the multi-byte locales as these tests aren't that interesting in those locales. Also ERR_SUBST is already defined for some tests so awkward to redefine to munge UTF8 quotes to ASCII.
Diffstat (limited to 'tests/misc/expr.pl')
-rwxr-xr-xtests/misc/expr.pl10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/misc/expr.pl b/tests/misc/expr.pl
index cb86851ef..5220e1f3f 100755
--- a/tests/misc/expr.pl
+++ b/tests/misc/expr.pl
@@ -164,8 +164,6 @@ my @Tests =
['bre61', '"acd" : "a\\(b\\)?c\\1d"', {OUT => ''}, {EXIT => 1}],
['bre62', '-- "-5" : "-\\{0,1\\}[0-9]*\$"', {OUT => '2'}],
- ['fail-b', '9 9',
- {ERR => "$prog: syntax error: unexpected argument '9'\n"}, {EXIT => 2}],
['fail-c', {ERR => "$prog: missing operand\n"
. "Try '$prog --help' for more information.\n"},
{EXIT => 2}],
@@ -179,6 +177,8 @@ my @Tests =
# Test syntax error messages
+ ['se0', '9 9',
+ {ERR => "$prog: syntax error: unexpected argument '9'\n"}, {EXIT => 2}],
['se1', "2 a", {EXIT=>2},
{ERR=>"$prog: syntax error: unexpected argument 'a'\n"}],
['se2', "2 '+'", {EXIT=>2},
@@ -210,6 +210,8 @@ foreach $t (@Tests)
}
}
+# Try multibyte locale in most tests.
+#
if ($mb_locale ne 'C')
{
# Duplicate each test vector, appending "-mb" to the test name and
@@ -218,6 +220,10 @@ if ($mb_locale ne 'C')
my @new;
foreach my $t (@Tests)
{
+ # Don't add the quote varying tests to the multi-byte set
+ $t->[0] =~ /^se/
+ and next;
+
my @new_t = @$t;
my $test_name = shift @new_t;