diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 2003-01-22 08:32:59 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 2003-01-22 08:32:59 +0000 |
commit | 9d9116831508c6c9cd81c32834701af14b7647a4 (patch) | |
tree | 4fcba7957460e652d6459b8cc77e9846d2d87165 /ext/XS/APItest/t/printf.t | |
parent | 58a5b889b12ec12d156c83f9a9db3ca70e64bbcb (diff) | |
download | perl-9d9116831508c6c9cd81c32834701af14b7647a4.tar.gz |
Tweak APItest for new semantics of printf.
Now printf() is always real printf() and not #define'd to
PerlIO_stdoutf() so PerlIO_flush() when STDOUT is redirected
back to original file does not affect stdout unless we are
using :stdio as implementation. So things printf()ed XS side
are not written to file (and turn up at end of test).
So add an XS function which does fflush(stdout), modify .pm
file to export it and .t file to call it.
p4raw-id: //depot/perlio@18547
Diffstat (limited to 'ext/XS/APItest/t/printf.t')
-rw-r--r-- | ext/XS/APItest/t/printf.t | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/XS/APItest/t/printf.t b/ext/XS/APItest/t/printf.t index 91f328cd5c..ef2769e8fa 100644 --- a/ext/XS/APItest/t/printf.t +++ b/ext/XS/APItest/t/printf.t @@ -33,10 +33,12 @@ print_long(4); print_float(4); print_long_double() if $ldok; # val=7 hardwired +print_flush(); + # Now redirect STDOUT and read from the file ok open(STDOUT, ">&", $oldout), "restore STDOUT"; ok open(my $foo, "<foo.out"), "open foo.out"; -print "# Test output by reading from file\n"; +#print "# Test output by reading from file\n"; # now test the output my @output = map { chomp; $_ } <$foo>; close $foo; |