mirror of
https://github.com/git/git.git
synced 2024-11-28 04:23:30 +08:00
t9700/test.pl: avoid bareword 'STDERR' in 3-argument open()
Some versions of perl complain when 'STDERR' is used as the third argument in the 3-argument form of open(). Convert to the 2-argument form which is described for duping STDERR in my second edition camel book. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Tested-by: Tom G. Christensen <tgc@statsbiblioteket.dk> on RHEL 3, Perl 5.8.0 Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
97a7a82f19
commit
8409bb3708
@ -38,7 +38,7 @@ is($r->get_color("color.test.slot1", "red"), $ansi_green, "get_color");
|
||||
# Failure cases for config:
|
||||
# Save and restore STDERR; we will probably extract this into a
|
||||
# "dies_ok" method and possibly move the STDERR handling to Git.pm.
|
||||
open our $tmpstderr, ">&", STDERR or die "cannot save STDERR"; close STDERR;
|
||||
open our $tmpstderr, ">&STDERR" or die "cannot save STDERR"; close STDERR;
|
||||
eval { $r->config("test.dupstring") };
|
||||
ok($@, "config: duplicate entry in scalar context fails");
|
||||
eval { $r->config_bool("test.boolother") };
|
||||
|
Loading…
Reference in New Issue
Block a user