diff options
author | 2019-02-13 21:15:00 +0000 | |
---|---|---|
committer | 2019-02-13 21:15:00 +0000 | |
commit | 9f11ffb7133c203312a01e4b986886bc88c7d74b (patch) | |
tree | 6618511204c614b20256e4ef9dea39a7b311d638 /gnu/usr.bin/perl/dist/ExtUtils-CBuilder/t | |
parent | Import perl-5.28.1 (diff) | |
download | wireguard-openbsd-9f11ffb7133c203312a01e4b986886bc88c7d74b.tar.xz wireguard-openbsd-9f11ffb7133c203312a01e4b986886bc88c7d74b.zip |
Fix merge issues, remove excess files - match perl-5.28.1 dist
looking good sthen@, Great! bluhm@
Diffstat (limited to 'gnu/usr.bin/perl/dist/ExtUtils-CBuilder/t')
-rw-r--r-- | gnu/usr.bin/perl/dist/ExtUtils-CBuilder/t/00-have-compiler.t | 20 | ||||
-rw-r--r-- | gnu/usr.bin/perl/dist/ExtUtils-CBuilder/t/02-link.t | 2 |
2 files changed, 11 insertions, 11 deletions
diff --git a/gnu/usr.bin/perl/dist/ExtUtils-CBuilder/t/00-have-compiler.t b/gnu/usr.bin/perl/dist/ExtUtils-CBuilder/t/00-have-compiler.t index 1073277fd19..e4706a0e74b 100644 --- a/gnu/usr.bin/perl/dist/ExtUtils-CBuilder/t/00-have-compiler.t +++ b/gnu/usr.bin/perl/dist/ExtUtils-CBuilder/t/00-have-compiler.t @@ -33,13 +33,13 @@ ok( $b, "got CBuilder object" ) or diag $@; # This will fork a child that will print # 'Can't exec "djaadjfkadjkfajdf"' - # or similar on STDERR; so make sure fd2 is temporarily closed before - # the fork - open(my $orig_err, ">&", \*STDERR) or die "Can't dup STDERR: $!"; - close(STDERR); + # or similar on STDERR; so make sure fd2 is temporarily redirected to + # oblivion before the fork + open(OLDERR, ">&STDERR") or die "Can't dup STDERR: $!"; + open(STDERR, ">", File::Spec->devnull()) or die "Can't redirect STDERR: $!"; my $res = $b1->have_compiler; - open(STDERR, ">&", $orig_err) or die "Can't dup \$orig_err $!"; - close($orig_err); + open(STDERR, ">&OLDERR") or die "Can't restore STDERR: $!"; + close(OLDERR); is($res, 0, "have_compiler: fake missing cc" ); } @@ -47,11 +47,11 @@ ok( $b, "got CBuilder object" ) or diag $@; my $b2 = ExtUtils::CBuilder->new(quiet => 1); configure_fake_missing_compilers($b2); - open(my $orig_err, ">&", \*STDERR) or die "Can't dup STDERR: $!"; - close(STDERR); + open(OLDERR, ">&STDERR") or die "Can't dup STDERR: $!"; + open(STDERR, ">", File::Spec->devnull()) or die "Can't redirect STDERR: $!"; my $res = $b2->have_cplusplus; - open(STDERR, ">&", $orig_err) or die "Can't dup \$orig_err $!"; - close($orig_err); + open(STDERR, ">&OLDERR") or die "Can't restore STDERR: $!"; + close(OLDERR); is($res, 0, "have_cplusplus: fake missing c++" ); } diff --git a/gnu/usr.bin/perl/dist/ExtUtils-CBuilder/t/02-link.t b/gnu/usr.bin/perl/dist/ExtUtils-CBuilder/t/02-link.t index 0c64619d541..6160c267d0c 100644 --- a/gnu/usr.bin/perl/dist/ExtUtils-CBuilder/t/02-link.t +++ b/gnu/usr.bin/perl/dist/ExtUtils-CBuilder/t/02-link.t @@ -33,7 +33,7 @@ ok $b, "created EU::CB object"; $source_file = File::Spec->catfile('t', 'linkt.c'); { - open my $FH, "> $source_file" or die "Can't create $source_file: $!"; + open my $FH, '>', $source_file or die "Can't create $source_file: $!"; print $FH "int main(void) { return 11; }\n"; close $FH; } |