From: Pádraig Brady
Date: Thu, 21 Sep 2017 05:12:20 +0000 (-0700) Subject: tests: avoid a false failure in expr test with UTF8 X-Git-Tag: v8.29~55 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a3f5f359eb1ca621ea9630bad032e875e116944;p=thirdparty%2Fcoreutils.git 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. --- diff --git a/tests/misc/expr.pl b/tests/misc/expr.pl index cb86851ef3..5220e1f3f5 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;