]>
git.ipfire.org Git - thirdparty/gcc.git/blob - libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/14975-2.cc
1 // { dg-require-namedlocale "" }
2 // { dg-require-fork "" }
3 // { dg-require-mkfifo "" }
5 // 2004-04-16 Petur Runolfsson <peturr02@ru.is>
7 // Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010
8 // Free Software Foundation, Inc.
10 // This file is part of the GNU ISO C++ Library. This library is free
11 // software; you can redistribute it and/or modify it under the
12 // terms of the GNU General Public License as published by the
13 // Free Software Foundation; either version 3, or (at your option)
16 // This library is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 // GNU General Public License for more details.
21 // You should have received a copy of the GNU General Public License along
22 // with this library; see the file COPYING3. If not see
23 // <http://www.gnu.org/licenses/>.
31 #include <sys/types.h>
34 // No asserts, avoid leaking the semaphore if a VERIFY fails.
35 #undef _GLIBCXX_ASSERT
37 #include <testsuite_hooks.h>
43 using namespace __gnu_test
;
44 bool test
__attribute__((unused
)) = true;
46 locale loc_us
= locale("en_US");
48 const char* name
= "tmp_14975-2";
50 signal(SIGPIPE
, SIG_IGN
);
53 mkfifo(name
, S_IRWXU
);
57 VERIFY( child
!= -1 );
63 fbin
.open(name
, ios_base::in
);
71 wfilebuf
* ret
= fb
.open(name
, ios_base::out
);
73 VERIFY( fb
.is_open() );
81 fb
.pubimbue(locale::classic());
85 catch (std::exception
&)