summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libstdc++-v3/ChangeLog28
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt_members_char_char.cc12
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt_members_wchar_t_char.cc12
-rw-r--r--libstdc++-v3/testsuite/22_locale/collate_members_char.cc13
-rw-r--r--libstdc++-v3/testsuite/22_locale/collate_members_wchar_t.cc13
-rw-r--r--libstdc++-v3/testsuite/22_locale/ctype_members_char.cc14
-rw-r--r--libstdc++-v3/testsuite/22_locale/ctype_members_wchar_t.cc12
-rw-r--r--libstdc++-v3/testsuite/22_locale/messages_members_char.cc12
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_get_members_char.cc17
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_get_members_wchar_t.cc17
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_put_members_char.cc16
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_put_members_wchar_t.cc16
-rw-r--r--libstdc++-v3/testsuite/22_locale/moneypunct_members_char.cc12
-rw-r--r--libstdc++-v3/testsuite/22_locale/moneypunct_members_wchar_t.cc12
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_get_members_char.cc15
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_get_members_wchar_t.cc15
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_put_members_char.cc1
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_put_members_wchar_t.cc1
-rw-r--r--libstdc++-v3/testsuite/22_locale/numpunct_members_char.cc12
-rw-r--r--libstdc++-v3/testsuite/22_locale/numpunct_members_wchar_t.cc12
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get_members_char.cc17
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get_members_wchar_t.cc17
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_put_members_char.cc13
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_put_members_wchar_t.cc13
24 files changed, 322 insertions, 0 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index b948d3a90d6..7f7d23d1e88 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,31 @@
+2002-05-06 Paolo Carlini <pcarlini@unitus.it>
+
+ Test all the facets for the temporary "C" locale switch issue.
+ * testsuite/22_locale/codecvt_members_char_char.cc: Add test03.
+ * testsuite/22_locale/codecvt_members_wchar_t_char.cc: Likewise.
+ * testsuite/22_locale/collate_members_char.cc: Add test04.
+ * testsuite/22_locale/collate_members_wchar_t.cc: Likewise.
+ * testsuite/22_locale/ctype_members_char.cc: Add test05.
+ * testsuite/22_locale/ctype_members_wchar_t.cc: Add test04.
+ * testsuite/22_locale/messages_members_char.cc: Add test03.
+ * testsuite/22_locale/money_get_members_char.cc: Add test08.
+ * testsuite/22_locale/money_get_members_wchar_t.cc: Likewise.
+ * testsuite/22_locale/money_put_members_char.cc: Add test07.
+ * testsuite/22_locale/money_put_members_wchar_t.cc: Likewise.
+ * testsuite/22_locale/moneypunct_members_char.cc: Add test03.
+ * testsuite/22_locale/moneypunct_members_wchar_t.cc: Likewise.
+ * testsuite/22_locale/num_get_members_char.cc: Add test06.
+ * testsuite/22_locale/num_get_members_wchar_t.cc: Likewise.
+ * testsuite/22_locale/numpunct_members_char.cc: Add test03.
+ * testsuite/22_locale/numpunct_members_wchar_t.cc: Likewise.
+ * testsuite/22_locale/time_get_members_char.cc: Add test08.
+ * testsuite/22_locale/time_get_members_wchar_t.cc: Likewise.
+ * testsuite/22_locale/time_put_members_char.cc: Add test04.
+ * testsuite/22_locale/time_put_members_wchar_t.cc: Likewise.
+
+ * testsuite/22_locale/num_put_members_char.cc (test04): Add comment.
+ * testsuite/22_locale/num_put_members_wchar_t.cc (test04): Likewise.
+
2002-05-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* config/os/irix/irix5.2/bits/os_defines.h (_SGI_SOURCE,
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt_members_char_char.cc b/libstdc++-v3/testsuite/22_locale/codecvt_members_char_char.cc
index 8b3dfc6d190..397c489c8d9 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt_members_char_char.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt_members_char_char.cc
@@ -97,9 +97,21 @@ void test02()
#endif
}
+// http://gcc.gnu.org/ml/libstdc++/2002-05/msg00038.html
+void test03()
+{
+ bool test = true;
+
+ std::string loc1 = setlocale(LC_ALL, "ja_JP.eucjp");
+ test01();
+ std::string loc2 = setlocale(LC_ALL, NULL);
+ VERIFY( loc1 == loc2 );
+}
+
int main ()
{
test01();
test02();
+ test03();
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt_members_wchar_t_char.cc b/libstdc++-v3/testsuite/22_locale/codecvt_members_wchar_t_char.cc
index 45655b7a601..4041c2e722d 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt_members_wchar_t_char.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt_members_wchar_t_char.cc
@@ -128,6 +128,17 @@ void test02()
}
#endif
}
+
+// http://gcc.gnu.org/ml/libstdc++/2002-05/msg00038.html
+void test03()
+{
+ bool test = true;
+
+ std::string loc1 = setlocale(LC_ALL, "ja_JP.eucjp");
+ test01();
+ std::string loc2 = setlocale(LC_ALL, NULL);
+ VERIFY( loc1 == loc2 );
+}
#endif /* !defined(_GLIBCPP_USE_WCHAR_T) */
@@ -136,6 +147,7 @@ int main ()
#if _GLIBCPP_USE_WCHAR_T
test01();
test02();
+ test03();
#endif
return 0;
diff --git a/libstdc++-v3/testsuite/22_locale/collate_members_char.cc b/libstdc++-v3/testsuite/22_locale/collate_members_char.cc
index f45ffd9d4aa..7ec42c685c7 100644
--- a/libstdc++-v3/testsuite/22_locale/collate_members_char.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate_members_char.cc
@@ -161,10 +161,23 @@ void test03()
VERIFY( l1 != l2 );
}
+// http://gcc.gnu.org/ml/libstdc++/2002-05/msg00038.html
+void test04()
+{
+ bool test = true;
+
+ std::string loc1 = setlocale(LC_ALL, "ja_JP.eucjp");
+ test01();
+ test03();
+ std::string loc2 = setlocale(LC_ALL, NULL);
+ VERIFY( loc1 == loc2 );
+}
+
int main()
{
test01();
test02();
test03();
+ test04();
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/collate_members_wchar_t.cc b/libstdc++-v3/testsuite/22_locale/collate_members_wchar_t.cc
index 5df42fe15d9..496dffe6490 100644
--- a/libstdc++-v3/testsuite/22_locale/collate_members_wchar_t.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate_members_wchar_t.cc
@@ -160,6 +160,18 @@ void test03()
long l2 = col.hash(str2.c_str(), str2.c_str() + str2.size());
VERIFY( l1 != l2 );
}
+
+// http://gcc.gnu.org/ml/libstdc++/2002-05/msg00038.html
+void test04()
+{
+ bool test = true;
+
+ std::string loc1 = setlocale(LC_ALL, "ja_JP.eucjp");
+ test01();
+ test03();
+ std::string loc2 = setlocale(LC_ALL, NULL);
+ VERIFY( loc1 == loc2 );
+}
#endif
int main()
@@ -168,6 +180,7 @@ int main()
test01();
test02();
test03();
+ test04();
#endif
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/ctype_members_char.cc b/libstdc++-v3/testsuite/22_locale/ctype_members_char.cc
index d1e47b6bbbd..da0786fc6b5 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype_members_char.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype_members_char.cc
@@ -280,11 +280,25 @@ void test04()
#endif
}
+// http://gcc.gnu.org/ml/libstdc++/2002-05/msg00038.html
+void test05()
+{
+ bool test = true;
+
+ std::string loc1 = setlocale(LC_ALL, "ja_JP.eucjp");
+ test01();
+ test02();
+ test03();
+ std::string loc2 = setlocale(LC_ALL, NULL);
+ VERIFY( loc1 == loc2 );
+}
+
int main()
{
test01();
test02();
test03();
test04();
+ test05();
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/ctype_members_wchar_t.cc b/libstdc++-v3/testsuite/22_locale/ctype_members_wchar_t.cc
index aac23dc5a92..f4db4f12f7d 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype_members_wchar_t.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype_members_wchar_t.cc
@@ -114,6 +114,17 @@ void test03()
}
#endif
}
+
+// http://gcc.gnu.org/ml/libstdc++/2002-05/msg00038.html
+void test04()
+{
+ bool test = true;
+
+ std::string loc1 = setlocale(LC_ALL, "ja_JP.eucjp");
+ test01();
+ std::string loc2 = setlocale(LC_ALL, NULL);
+ VERIFY( loc1 == loc2 );
+}
#endif /* !defined(_GLIBCPP_USE_WCHAR_T) */
int main()
@@ -121,6 +132,7 @@ int main()
#if _GLIBCPP_USE_WCHAR_T
test01();
test03();
+ test04();
#endif
return 0;
diff --git a/libstdc++-v3/testsuite/22_locale/messages_members_char.cc b/libstdc++-v3/testsuite/22_locale/messages_members_char.cc
index d37a86e7720..81004b9473a 100644
--- a/libstdc++-v3/testsuite/22_locale/messages_members_char.cc
+++ b/libstdc++-v3/testsuite/22_locale/messages_members_char.cc
@@ -99,9 +99,21 @@ void test02()
#endif
}
+// http://gcc.gnu.org/ml/libstdc++/2002-05/msg00038.html
+void test03()
+{
+ bool test = true;
+
+ std::string loc1 = setlocale(LC_ALL, "ja_JP.eucjp");
+ test01();
+ std::string loc2 = setlocale(LC_ALL, NULL);
+ VERIFY( loc1 == loc2 );
+}
+
int main()
{
test01();
test02();
+ test03();
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/money_get_members_char.cc b/libstdc++-v3/testsuite/22_locale/money_get_members_char.cc
index efe806fed33..2dec7ef60d7 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get_members_char.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get_members_char.cc
@@ -546,6 +546,22 @@ void test07()
VERIFY( val_b_ns == "123456" );
}
+// http://gcc.gnu.org/ml/libstdc++/2002-05/msg00038.html
+void test08()
+{
+ bool test = true;
+
+ std::string loc1 = setlocale(LC_ALL, "ja_JP.eucjp");
+ test01();
+ test02();
+ test03();
+ test05();
+ test06();
+ test07();
+ std::string loc2 = setlocale(LC_ALL, NULL);
+ VERIFY( loc1 == loc2 );
+}
+
int main()
{
test01();
@@ -555,5 +571,6 @@ int main()
test05();
test06();
test07();
+ test08();
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/money_get_members_wchar_t.cc b/libstdc++-v3/testsuite/22_locale/money_get_members_wchar_t.cc
index 2229de87ef6..8809d58d0c3 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get_members_wchar_t.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get_members_wchar_t.cc
@@ -546,6 +546,22 @@ void test07()
mg_b.get(ibeg_b_ns,iend_b_ns,intl,fmt_b_ns,err,val_b_ns);
VERIFY( val_b_ns == L"123456" );
}
+
+// http://gcc.gnu.org/ml/libstdc++/2002-05/msg00038.html
+void test08()
+{
+ bool test = true;
+
+ std::string loc1 = setlocale(LC_ALL, "ja_JP.eucjp");
+ test01();
+ test02();
+ test03();
+ test05();
+ test06();
+ test07();
+ std::string loc2 = setlocale(LC_ALL, NULL);
+ VERIFY( loc1 == loc2 );
+}
#endif
int main()
@@ -558,6 +574,7 @@ int main()
test05();
test06();
test07();
+ test08();
#endif
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/money_put_members_char.cc b/libstdc++-v3/testsuite/22_locale/money_put_members_char.cc
index a97f78fc8d6..02558becf0f 100644
--- a/libstdc++-v3/testsuite/22_locale/money_put_members_char.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_put_members_char.cc
@@ -368,6 +368,21 @@ void test06()
VERIFY( fmt );
}
+// http://gcc.gnu.org/ml/libstdc++/2002-05/msg00038.html
+void test07()
+{
+ bool test = true;
+
+ std::string loc1 = setlocale(LC_ALL, "ja_JP.eucjp");
+ test01();
+ test02();
+ test03();
+ test05();
+ test06();
+ std::string loc2 = setlocale(LC_ALL, NULL);
+ VERIFY( loc1 == loc2 );
+}
+
int main()
{
test01();
@@ -376,5 +391,6 @@ int main()
test04();
test05();
test06();
+ test07();
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/money_put_members_wchar_t.cc b/libstdc++-v3/testsuite/22_locale/money_put_members_wchar_t.cc
index dc77d0a0504..63880a2ae7a 100644
--- a/libstdc++-v3/testsuite/22_locale/money_put_members_wchar_t.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_put_members_wchar_t.cc
@@ -367,6 +367,21 @@ void test06()
mp.put(out,intl,fmt,'*',val);
VERIFY( fmt );
}
+
+// http://gcc.gnu.org/ml/libstdc++/2002-05/msg00038.html
+void test07()
+{
+ bool test = true;
+
+ std::string loc1 = setlocale(LC_ALL, "ja_JP.eucjp");
+ test01();
+ test02();
+ test03();
+ test05();
+ test06();
+ std::string loc2 = setlocale(LC_ALL, NULL);
+ VERIFY( loc1 == loc2 );
+}
#endif
int main()
@@ -378,6 +393,7 @@ int main()
test04();
test05();
test06();
+ test07();
#endif
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/moneypunct_members_char.cc b/libstdc++-v3/testsuite/22_locale/moneypunct_members_char.cc
index 3d4f5a0968b..930b4f5192e 100644
--- a/libstdc++-v3/testsuite/22_locale/moneypunct_members_char.cc
+++ b/libstdc++-v3/testsuite/22_locale/moneypunct_members_char.cc
@@ -123,9 +123,21 @@ void test02()
#endif
}
+// http://gcc.gnu.org/ml/libstdc++/2002-05/msg00038.html
+void test03()
+{
+ bool test = true;
+
+ std::string loc1 = setlocale(LC_ALL, "ja_JP.eucjp");
+ test01();
+ std::string loc2 = setlocale(LC_ALL, NULL);
+ VERIFY( loc1 == loc2 );
+}
+
int main()
{
test01();
test02();
+ test03();
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/moneypunct_members_wchar_t.cc b/libstdc++-v3/testsuite/22_locale/moneypunct_members_wchar_t.cc
index f3b2f0c3908..752a0e92409 100644
--- a/libstdc++-v3/testsuite/22_locale/moneypunct_members_wchar_t.cc
+++ b/libstdc++-v3/testsuite/22_locale/moneypunct_members_wchar_t.cc
@@ -123,6 +123,17 @@ void test02()
}
#endif
}
+
+// http://gcc.gnu.org/ml/libstdc++/2002-05/msg00038.html
+void test03()
+{
+ bool test = true;
+
+ std::string loc1 = setlocale(LC_ALL, "ja_JP.eucjp");
+ test01();
+ std::string loc2 = setlocale(LC_ALL, NULL);
+ VERIFY( loc1 == loc2 );
+}
#endif
int main()
@@ -130,6 +141,7 @@ int main()
#ifdef _GLIBCPP_USE_WCHAR_T
test01();
test02();
+ test03();
#endif
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/num_get_members_char.cc b/libstdc++-v3/testsuite/22_locale/num_get_members_char.cc
index 7bf1e6956e7..c852f33f120 100644
--- a/libstdc++-v3/testsuite/22_locale/num_get_members_char.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_get_members_char.cc
@@ -413,6 +413,20 @@ void test05()
VERIFY( d == 1234.5 );
}
+// http://gcc.gnu.org/ml/libstdc++/2002-05/msg00038.html
+void test06()
+{
+ bool test = true;
+
+ std::string loc1 = setlocale(LC_ALL, "ja_JP.eucjp");
+ test01();
+ test02();
+ test04();
+ test05();
+ std::string loc2 = setlocale(LC_ALL, NULL);
+ VERIFY( loc1 == loc2 );
+}
+
int main()
{
test01();
@@ -420,6 +434,7 @@ int main()
test03();
test04();
test05();
+ test06();
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/num_get_members_wchar_t.cc b/libstdc++-v3/testsuite/22_locale/num_get_members_wchar_t.cc
index 2efbe5c5aff..6a59d9d6cba 100644
--- a/libstdc++-v3/testsuite/22_locale/num_get_members_wchar_t.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_get_members_wchar_t.cc
@@ -414,6 +414,20 @@ void test05()
VERIFY( err == goodbit );
VERIFY( d == 1234.5 );
}
+
+// http://gcc.gnu.org/ml/libstdc++/2002-05/msg00038.html
+void test06()
+{
+ bool test = true;
+
+ std::string loc1 = setlocale(LC_ALL, "ja_JP.eucjp");
+ test01();
+ test02();
+ test04();
+ test05();
+ std::string loc2 = setlocale(LC_ALL, NULL);
+ VERIFY( loc1 == loc2 );
+}
#endif
int main()
@@ -424,6 +438,7 @@ int main()
test03();
test04();
test05();
+ test06();
#endif
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/num_put_members_char.cc b/libstdc++-v3/testsuite/22_locale/num_put_members_char.cc
index 09630833d22..185cc9ded24 100644
--- a/libstdc++-v3/testsuite/22_locale/num_put_members_char.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_put_members_char.cc
@@ -310,6 +310,7 @@ void test03()
#endif
}
+// http://gcc.gnu.org/ml/libstdc++/2002-05/msg00038.html
void test04()
{
bool test = true;
diff --git a/libstdc++-v3/testsuite/22_locale/num_put_members_wchar_t.cc b/libstdc++-v3/testsuite/22_locale/num_put_members_wchar_t.cc
index f3ac69238bf..8479b1bb590 100644
--- a/libstdc++-v3/testsuite/22_locale/num_put_members_wchar_t.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_put_members_wchar_t.cc
@@ -310,6 +310,7 @@ void test03()
#endif
}
+// http://gcc.gnu.org/ml/libstdc++/2002-05/msg00038.html
void test04()
{
bool test = true;
diff --git a/libstdc++-v3/testsuite/22_locale/numpunct_members_char.cc b/libstdc++-v3/testsuite/22_locale/numpunct_members_char.cc
index fa71a90e825..13bda1fa4ff 100644
--- a/libstdc++-v3/testsuite/22_locale/numpunct_members_char.cc
+++ b/libstdc++-v3/testsuite/22_locale/numpunct_members_char.cc
@@ -101,9 +101,21 @@ void test02()
#endif
}
+// http://gcc.gnu.org/ml/libstdc++/2002-05/msg00038.html
+void test03()
+{
+ bool test = true;
+
+ std::string loc1 = setlocale(LC_ALL, "ja_JP.eucjp");
+ test01();
+ std::string loc2 = setlocale(LC_ALL, NULL);
+ VERIFY( loc1 == loc2 );
+}
+
int main()
{
test01();
test02();
+ test03();
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/numpunct_members_wchar_t.cc b/libstdc++-v3/testsuite/22_locale/numpunct_members_wchar_t.cc
index ec2337cd076..39025b16d2b 100644
--- a/libstdc++-v3/testsuite/22_locale/numpunct_members_wchar_t.cc
+++ b/libstdc++-v3/testsuite/22_locale/numpunct_members_wchar_t.cc
@@ -98,6 +98,17 @@ void test02()
}
#endif
}
+
+// http://gcc.gnu.org/ml/libstdc++/2002-05/msg00038.html
+void test03()
+{
+ bool test = true;
+
+ std::string loc1 = setlocale(LC_ALL, "ja_JP.eucjp");
+ test01();
+ std::string loc2 = setlocale(LC_ALL, NULL);
+ VERIFY( loc1 == loc2 );
+}
#endif
int main()
@@ -105,6 +116,7 @@ int main()
#ifdef _GLIBCPP_USE_WCHAR_T
test01();
test02();
+ test03();
#endif
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/time_get_members_char.cc b/libstdc++-v3/testsuite/22_locale/time_get_members_char.cc
index 2ba8cca272f..e0aaeec262a 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get_members_char.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get_members_char.cc
@@ -699,6 +699,22 @@ void test07()
#endif
}
+// http://gcc.gnu.org/ml/libstdc++/2002-05/msg00038.html
+void test08()
+{
+ bool test = true;
+
+ std::string loc1 = setlocale(LC_ALL, "ja_JP.eucjp");
+ test01();
+ test02();
+ test03();
+ test04();
+ test05();
+ test06();
+ std::string loc2 = setlocale(LC_ALL, NULL);
+ VERIFY( loc1 == loc2 );
+}
+
int main()
{
test01();
@@ -710,5 +726,6 @@ int main()
test06();
test07();
+ test08();
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/time_get_members_wchar_t.cc b/libstdc++-v3/testsuite/22_locale/time_get_members_wchar_t.cc
index 27530935b3c..d4f0632e3eb 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get_members_wchar_t.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get_members_wchar_t.cc
@@ -698,6 +698,22 @@ void test07()
}
#endif
}
+
+// http://gcc.gnu.org/ml/libstdc++/2002-05/msg00038.html
+void test08()
+{
+ bool test = true;
+
+ std::string loc1 = setlocale(LC_ALL, "ja_JP.eucjp");
+ test01();
+ test02();
+ test03();
+ test04();
+ test05();
+ test06();
+ std::string loc2 = setlocale(LC_ALL, NULL);
+ VERIFY( loc1 == loc2 );
+}
#endif
int main()
@@ -712,6 +728,7 @@ int main()
test06();
test07();
+ test08();
#endif
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/time_put_members_char.cc b/libstdc++-v3/testsuite/22_locale/time_put_members_char.cc
index e3c4e2552c4..6f17df5dbf9 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put_members_char.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put_members_char.cc
@@ -250,10 +250,23 @@ void test03()
#endif
}
+// http://gcc.gnu.org/ml/libstdc++/2002-05/msg00038.html
+void test04()
+{
+ bool test = true;
+
+ std::string loc1 = setlocale(LC_ALL, "ja_JP.eucjp");
+ test01();
+ test02();
+ std::string loc2 = setlocale(LC_ALL, NULL);
+ VERIFY( loc1 == loc2 );
+}
+
int main()
{
test01();
test02();
test03();
+ test04();
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/time_put_members_wchar_t.cc b/libstdc++-v3/testsuite/22_locale/time_put_members_wchar_t.cc
index a2bfd7d3d1a..251d1749670 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put_members_wchar_t.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put_members_wchar_t.cc
@@ -251,6 +251,18 @@ void test03()
}
#endif
}
+
+// http://gcc.gnu.org/ml/libstdc++/2002-05/msg00038.html
+void test04()
+{
+ bool test = true;
+
+ std::string loc1 = setlocale(LC_ALL, "ja_JP.eucjp");
+ test01();
+ test02();
+ std::string loc2 = setlocale(LC_ALL, NULL);
+ VERIFY( loc1 == loc2 );
+}
#endif
int main()
@@ -259,6 +271,7 @@ int main()
test01();
test02();
test03();
+ test04();
#endif
return 0;
}