From 54deb54db989dde759410af9918802961c43bc58 Mon Sep 17 00:00:00 2001 From: Pádraig Brady
Date: Fri, 8 Feb 2013 16:05:25 +0000
Subject: tests: skip numfmt grouping tests on some systems
* tests/misc/numfmt.pl: When the system locale grouping doesn't
match our expected format for grouping 1234 in the fr_FR locale,
reset the locale to 'C' so as to skip all locale tests.
---
tests/misc/numfmt.pl | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
(limited to 'tests')
diff --git a/tests/misc/numfmt.pl b/tests/misc/numfmt.pl
index c542483f0..b46e4d55b 100644
--- a/tests/misc/numfmt.pl
+++ b/tests/misc/numfmt.pl
@@ -883,7 +883,21 @@ my @Locale_Tests =
{ENV=>"LC_ALL=$locale"}],
);
-push @Tests, @Locale_Tests if $locale ne "C";
+if ($locale ne 'C')
+ {
+ # Reset locale to 'C' if LOCALE_FR_UTF8 doesn't output as expected
+ # as determined by the separate printf program.
+ open(LOC_NUM, "LC_ALL=$locale printf \"%'d\" 1234|")
+ or die "Can't fork command: $!";
+ my $loc_num =