2 // 2000-05-21 Benjamin Kosnik <bkoz@redhat.com>
3 // 2001-01-17 Loren J. Rittle <ljrittle@acm.org>
5 // Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
6 // Free Software Foundation
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 2, 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 COPYING. If not, write to the Free
21 // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
24 // 27.4.2.4 ios_base static members
26 // @diff@ %-*.tst %-*.txt
28 // This test fails on platforms using a wrapper, because this test
29 // redirects stdout to a file and so the exit status printed by the
30 // wrapper is not visibile to DejaGNU. DejaGNU then assumes that the
31 // test exited with a non-zero exit status.
32 // { dg-do run { xfail { ! unwrapped } } }
37 #include <testsuite_hooks.h>
39 // N.B. Once we have called sync_with_stdio(false), we can never go back.
44 std::ios_base::sync_with_stdio();
45 std::freopen("ios_base_members_static-1.txt", "w", stderr
);
47 for (int i
= 0; i
< 2; i
++)
49 std::fprintf(stderr
, "1");
51 std::putc('3', stderr
);
53 std::fputs("5", stderr
);
55 std::putc('7', stderr
);
56 std::cerr
<< 8 << '9';
57 std::fprintf(stderr
, "0\n");