]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: omit inapplicable test code
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 16 Nov 2023 18:12:55 +0000 (10:12 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 16 Nov 2023 19:37:25 +0000 (11:37 -0800)
* tests/misc/join.pl, tests/uniq/uniq.pl:
Remove test for "invalid byte, character or field list" message
that is not generated.

tests/cut/cut.pl
tests/expr/expr.pl
tests/misc/join.pl
tests/uniq/uniq.pl

index 2e019078dc15aa3a2068db1dcdd7c4137cd416e7..872a24ac8c87c49e15f6408303a2cf1e98ae3f90 100755 (executable)
@@ -233,7 +233,7 @@ if ($mb_locale ne 'C')
   {
     # Duplicate each test vector, appending "-mb" to the test name and
     # inserting {ENV => "LC_ALL=$mb_locale"} in the copy, so that we
-    # provide coverage for the distro-added multi-byte code paths.
+    # provide coverage for multi-byte code paths.
     my @new;
     foreach my $t (@Tests)
       {
index f4863b109d02975d8304a51cd774ab2e2d216d14..f12f30b5f192c74d27bd8052e5729da5df5faa8b 100755 (executable)
@@ -215,7 +215,7 @@ if ($mb_locale ne 'C')
   {
     # Duplicate each test vector, appending "-mb" to the test name and
     # inserting {ENV => "LC_ALL=$mb_locale"} in the copy, so that we
-    # provide coverage for the distro-added multi-byte code paths.
+    # provide coverage for multi-byte code paths.
     my @new;
     foreach my $t (@Tests)
       {
index 4eafc273d6ea4df498f244d22070f09767c7358e..514633a5d8c5b3d09e02862ae59c0c1380488589 100755 (executable)
@@ -26,7 +26,6 @@ my $limits = getlimits ();
 my $prog = 'join';
 
 my $try = "Try '$prog --help' for more information.\n";
-my $inval = "$prog: invalid byte, character or field list\n$try";
 
 my $mb_locale;
 #Comment out next line to disable multibyte tests
@@ -342,31 +341,17 @@ foreach my $t (@tv)
     push @Tests, $new_ent;
   }
 
-# Add _POSIX2_VERSION=199209 to the environment of each test
-# that uses an old-style option like +1.
 if ($mb_locale ne 'C')
   {
     # Duplicate each test vector, appending "-mb" to the test name and
     # inserting {ENV => "LC_ALL=$mb_locale"} in the copy, so that we
-    # provide coverage for the distro-added multi-byte code paths.
+    # provide coverage for multi-byte code paths.
     my @new;
     foreach my $t (@Tests)
       {
         my @new_t = @$t;
         my $test_name = shift @new_t;
 
-        # Depending on whether join 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;
-          }
         #Adjust the output some error messages including test_name for mb
         if (grep {ref $_ eq 'HASH' && exists $_->{ERR}}
              (@new_t))
index e43cd6e3f745800979d191d49d3c0905659cdc2d..f8aff5fa53816809a03c0b64404afcdc419e222b 100755 (executable)
@@ -23,8 +23,6 @@ my $limits = getlimits ();
 my $prog = 'uniq';
 my $try = "Try '$prog --help' for more information.\n";
 
-my $inval = "$prog: invalid byte, character or field list\n$try";
-
 # Turn off localization of executable's output.
 @ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
 
@@ -274,25 +272,13 @@ if ($mb_locale ne 'C')
   {
     # Duplicate each test vector, appending "-mb" to the test name and
     # inserting {ENV => "LC_ALL=$mb_locale"} in the copy, so that we
-    # provide coverage for the distro-added multi-byte code paths.
+    # provide coverage for multi-byte code paths.
     my @new;
     foreach my $t (@Tests)
       {
         my @new_t = @$t;
         my $test_name = shift @new_t;
 
-        # Depending on whether uniq 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;
-          }
         # In test #145, replace the each ‘...’ by '...'.
         if ($test_name =~ "145")
           {