summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-04-22 18:26:55 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-04-22 18:26:55 (GMT)
commit2483fba54e9a870e110448cd463c10684d45ed36 (patch)
treecab12fe722e2a9ffd82bcf386fb6457fcd7b7707 /t
parent2903c28ebb04ad99722cd0f99a4fe09c5f3e8aa0 (diff)
parenta749c0bbef068af339ea1ac8843f8ca307b3dd35 (diff)
downloadgit-2483fba54e9a870e110448cd463c10684d45ed36.zip
git-2483fba54e9a870e110448cd463c10684d45ed36.tar.gz
git-2483fba54e9a870e110448cd463c10684d45ed36.tar.bz2
Merge branch 'tr/perl-keep-stderr-open' into maint
* tr/perl-keep-stderr-open: t9700: do not close STDERR perl: redirect stderr to /dev/null instead of closing
Diffstat (limited to 't')
-rwxr-xr-xt/t9700/test.pl3
1 files changed, 2 insertions, 1 deletions
diff --git a/t/t9700/test.pl b/t/t9700/test.pl
index 0d4e366..1140767 100755
--- a/t/t9700/test.pl
+++ b/t/t9700/test.pl
@@ -45,7 +45,8 @@ 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";
+open STDERR, ">", "/dev/null" or die "cannot redirect STDERR to /dev/null";
is($r->config("test.dupstring"), "value2", "config: multivar");
eval { $r->config_bool("test.boolother") };
ok($@, "config_bool: non-boolean values fail");