aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/27_io/streambuf_members.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/testsuite/27_io/streambuf_members.cc')
-rw-r--r--libstdc++-v3/testsuite/27_io/streambuf_members.cc25
1 files changed, 24 insertions, 1 deletions
diff --git a/libstdc++-v3/testsuite/27_io/streambuf_members.cc b/libstdc++-v3/testsuite/27_io/streambuf_members.cc
index 3f9a3192b7e..aaad07dc47f 100644
--- a/libstdc++-v3/testsuite/27_io/streambuf_members.cc
+++ b/libstdc++-v3/testsuite/27_io/streambuf_members.cc
@@ -1,6 +1,6 @@
// 1999-10-11 bkoz
-// Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -364,6 +364,28 @@ test07()
VERIFY(out.good());
}
+// libstdc++/9322
+void test08()
+{
+ using std::locale;
+ bool test = true;
+
+ locale loc;
+ testbuf2 ob;
+ VERIFY( ob.getloc() == loc );
+
+ locale::global(locale("en_US"));
+ VERIFY( ob.getloc() == loc );
+
+ locale loc_de ("de_DE");
+ locale ret = ob.pubimbue(loc_de);
+ VERIFY( ob.getloc() == loc_de );
+ VERIFY( ret == loc );
+
+ locale::global(loc);
+ VERIFY( ob.getloc() == loc_de );
+}
+
int main()
{
test01();
@@ -374,5 +396,6 @@ int main()
test05();
test07();
+ test08();
return 0;
}