]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: avoid false failure with partial locale info
authorPádraig Brady <P@draigBrady.com>
Mon, 25 Mar 2024 18:27:13 +0000 (18:27 +0000)
committerPádraig Brady <P@draigBrady.com>
Mon, 25 Mar 2024 18:40:53 +0000 (18:40 +0000)
* tests/misc/numfmt.pl: Some systems with the fr_FR.UTF-8
locale installed, do not have a thousands grouping character defined.
In this case we skip the locale tests which depend on a non empty
grouping character.

tests/misc/numfmt.pl

index 0905a0cca59da95436997ac6fb90bcf3f761aafe..7abcb39ce043b38526742e0e96c515fff1d20e3a 100755 (executable)
@@ -1018,6 +1018,11 @@ if ($locale ne 'C')
       or die "Can't fork command: $!";
     $lg = <LOC_GRP>;
     close(LOC_GRP) || die "Failed to read locale grouping from printf";
+    if (! defined $lg || $lg eq '')
+      {
+        warn "skipping locale grouping tests as no grouping character\n";
+        $locale = 'C';
+      }
   }
 
 my @Locale_Tests =