1
# Copyright (c) 2009 by David Golden. All rights reserved.
2
# Licensed under Apache License, Version 2.0 (the "License").
3
# You may not use this file except in compliance with the License.
4
# A copy of the License was distributed with this file or you may obtain a
5
# copy of the License from http://www.apache.org/licenses/LICENSE-2.0
10
use t::lib::Utils qw/save_std restore_std next_fd/;
11
use t::lib::Cases qw/run_test/;
14
my $no_fork = $^O ne 'MSWin32' && ! $Config{d_fork};
16
plan skip_all => "In memory files require Perl 5.8"
21
my $builder = Test::More->builder;
22
binmode($builder->failure_output, ':utf8') if $] >= 5.008;
25
ok( close STDOUT, "closed STDOUT" );
26
ok( open( STDOUT, ">", \(my $stdout_buf)), "reopened STDOUT to string" );
44
is( next_fd, $fd, "no file descriptors leaked" );
45
restore_std(qw/stdout/);