t9700: do not close STDERR

Much like the previous patch, this triggered an unrelated bug. Closing STDERR is not worth it anyway, as we risk writing die() and such to random files that happen to be subsequently opened on FD 2. Don't do it. Signed-off-by: Thomas Rast <trast@inf.ethz.ch> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Thomas Rast committed Apr 4, 2013 at 22:41 UTC a749c0bbef068af339ea1ac8843f8ca307b3dd35
1 file changed +2 -1
t/t9700/test.pl
+2 -1
@@ -45,7 +45,8 @@ is($r->get_color("color.test.slot1", "red"), $ansi_green, "get_color");
45 # Failure cases for config:
46 # Save and restore STDERR; we will probably extract this into a
47 # "dies_ok" method and possibly move the STDERR handling to Git.pm.
48 -open our $tmpstderr, ">&STDERR" or die "cannot save STDERR"; close STDERR;
48 +open our $tmpstderr, ">&STDERR" or die "cannot save STDERR";
49 +open STDERR, ">", "/dev/null" or die "cannot redirect STDERR to /dev/null";
50 is($r->config("test.dupstring"), "value2", "config: multivar");
51 eval { $r->config_bool("test.boolother") };
52 ok($@, "config_bool: non-boolean values fail");