On 15/10/18 14:55 +0100, Jonathan Wakely wrote:
Glibc changed the it_IT locales to use thousands separators,
invalidating this test. Use nl_NL instead, as Dutch only uses grouping
for money not numbers.
* testsuite/22_locale/numpunct/members/char/3.cc: Adjust test to
account for change to glibc it_IT localedata (glibc bz#10797).
Tested x86_64-linux, committed to trunk.
Backported to 6, 7 and 8 too.
commit e4a550b85fec6440e4fe70817e96f496874f36d8
Author: Jonathan Wakely <jwak...@redhat.com>
Date: Mon Oct 15 14:48:20 2018 +0100
Adjust test to pass with latest glibc
Glibc changed the it_IT locales to use thousands separators,
invalidating this test. Use nl_NL instead, as Dutch only uses grouping
for money not numbers.
* testsuite/22_locale/numpunct/members/char/3.cc: Adjust test to
account for change to glibc it_IT localedata (glibc bz#10797).
diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/char/3.cc
b/libstdc++-v3/testsuite/22_locale/numpunct/members/char/3.cc
index f314502461a..a55cf89b294 100644
--- a/libstdc++-v3/testsuite/22_locale/numpunct/members/char/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/char/3.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "it_IT.ISO8859-15" }
+// { dg-require-namedlocale "nl_NL.ISO8859-15" }
// 2001-01-24 Benjamin Kosnik <b...@redhat.com>
@@ -28,12 +28,14 @@ void test02()
{
using namespace std;
- locale loc_it = locale(ISO_8859(15,it_IT));
+ // nl_NL chosen because it has no thousands separator (at this time).
+ locale loc_it = locale(ISO_8859(15,nl_NL));
const numpunct<char>& nump_it = use_facet<numpunct<char> >(loc_it);
string g = nump_it.grouping();
+ // Ensure that grouping is empty for locales with empty thousands separator.
VERIFY( g == "" );
}