diff options
author | (no author) <(no author)@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-01-31 20:38:54 +0000 |
---|---|---|
committer | (no author) <(no author)@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-01-31 20:38:54 +0000 |
commit | 59ac20130178f4dc977d171044c85f3cf07caa84 (patch) | |
tree | aa369ecffc2a87f503929cfae66b07b606cbdc64 /libstdc++-v3/testsuite/27_io/filebuf_virtuals.cc | |
parent | 964944fc854c1dd723f7b8150d0deac634aabdbb (diff) |
This commit was manufactured by cvs2svn to create taghammer-3_3-merge-20030131
'hammer-3_3-merge-20030131'.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/tags/hammer-3_3-merge-20030131@62199 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/testsuite/27_io/filebuf_virtuals.cc')
-rw-r--r-- | libstdc++-v3/testsuite/27_io/filebuf_virtuals.cc | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/libstdc++-v3/testsuite/27_io/filebuf_virtuals.cc b/libstdc++-v3/testsuite/27_io/filebuf_virtuals.cc index 0a92788296a..c02e1a77be9 100644 --- a/libstdc++-v3/testsuite/27_io/filebuf_virtuals.cc +++ b/libstdc++-v3/testsuite/27_io/filebuf_virtuals.cc @@ -1,6 +1,6 @@ // 2001-05-21 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002 Free Software Foundation, Inc. +// Copyright (C) 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 @@ -21,6 +21,7 @@ // 27.8.1.4 Overridden virtual functions #include <fstream> +#include <locale> #include <testsuite_hooks.h> // @require@ %-*.tst %-*.txt @@ -514,6 +515,28 @@ void test06() VERIFY( buffer[0] == 'a' ); } +// libstdc++/9322 +void test07() +{ + using std::locale; + bool test = true; + + locale loc; + std::filebuf 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 ); +} + main() { test01(); @@ -524,5 +547,6 @@ main() test05(); test06(); + test07(); return 0; } |