1 // { dg-require-namedlocale "" }
2 // { dg-require-fork "" }
3 // { dg-require-mkfifo "" }
5 // 2004-01-11 Petur Runolfsson <peturr02@ru.is>
7 // Copyright (C) 2004, 2005 Free Software Foundation, Inc.
9 // This file is part of the GNU ISO C++ Library. This library is free
10 // software; you can redistribute it and/or modify it under the
11 // terms of the GNU General Public License as published by the
12 // Free Software Foundation; either version 2, or (at your option)
15 // This library is distributed in the hope that it will be useful,
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 // GNU General Public License for more details.
20 // You should have received a copy of the GNU General Public License along
21 // with this library; see the file COPYING. If not, write to the Free
22 // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
25 // 27.8.1.4 Overridden virtual functions
31 #include <sys/types.h>
34 #include <testsuite_hooks.h>
39 bool test
__attribute__((unused
)) = true;
41 using namespace __gnu_test
;
43 locale
loc_en(locale("en_US"));
44 locale
loc_fr(locale("fr_FR"));
46 const char* name
= "tmp_fifo_13582-2";
48 mkfifo(name
, S_IRWXU
);
54 fbout
.open(name
, ios_base::out
);
55 fbout
.sputn("12345", 5);
63 fbin
.open(name
, ios_base::in
);
65 wfilebuf::int_type n
= fbin
.sbumpc();
67 fbin
.pubimbue(loc_en
);
70 fbin
.pubimbue(loc_fr
);
78 VERIFY( n
== wfilebuf::traits_type::eof() );