]>
git.ipfire.org Git - thirdparty/gcc.git/blob - libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc
1 // { dg-require-namedlocale "fr_FR.ISO8859-15" }
2 // { dg-require-namedlocale "en_US.ISO8859-1" }
3 // { dg-require-fork "" }
4 // { dg-require-mkfifo "" }
6 // Copyright (C) 2003-2019 Free Software Foundation, Inc.
8 // This file is part of the GNU ISO C++ Library. This library is free
9 // software; you can redistribute it and/or modify it under the
10 // terms of the GNU General Public License as published by the
11 // Free Software Foundation; either version 3, or (at your option)
14 // This library is distributed in the hope that it will be useful,
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 // GNU General Public License for more details.
19 // You should have received a copy of the GNU General Public License along
20 // with this library; see the file COPYING3. If not see
21 // <http://www.gnu.org/licenses/>.
23 // 27.8.1.4 Overridden virtual functions
29 #include <sys/types.h>
32 #include <testsuite_hooks.h>
39 using namespace __gnu_test
;
41 locale
loc_fr(locale(ISO_8859(15,fr_FR
)));
42 locale
loc_en(locale(ISO_8859(1,en_US
)));
44 const char* name
= "tmp_fifo_13171-2";
46 mkfifo(name
, S_IRWXU
);
53 fb
.open(name
, ios_base::out
);
64 fb
.open(name
, ios_base::in
);
66 test
&= bool( fb
.is_open() );
68 filebuf::int_type c
= fb
.sgetc();
70 test
&= bool( c
== 'S' );