]>
git.ipfire.org Git - thirdparty/gcc.git/blob - libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13582-2.cc
1 // { dg-require-namedlocale "en_US.ISO8859-1" }
2 // { dg-require-namedlocale "fr_FR.ISO8859-15" }
3 // { dg-require-fork "" }
4 // { dg-require-mkfifo "" }
6 // 2004-01-11 Petur Runolfsson <peturr02@ru.is>
8 // Copyright (C) 2004-2020 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/>.
25 // 27.8.1.4 Overridden virtual functions
32 #include <sys/types.h>
35 #include <testsuite_hooks.h>
41 using namespace __gnu_test
;
43 locale
loc_en(locale(ISO_8859(1,en_US
)));
44 locale
loc_fr(locale(ISO_8859(15,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);
62 fbin
.open(name
, ios_base::in
);
63 filebuf::int_type n
= fbin
.sbumpc();
65 fbin
.pubimbue(loc_en
);
68 fbin
.pubimbue(loc_fr
);
76 VERIFY( n
== filebuf::traits_type::eof() );