diff options
author | Thomas Rast <trast@inf.ethz.ch> | 2013-04-04 22:41:42 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-04-04 14:49:56 -0700 |
commit | a749c0bbef068af339ea1ac8843f8ca307b3dd35 (patch) | |
tree | 6bdfaa123a656ba59456ed35d3e6629d40e7e09d /t | |
parent | bd4ca09d4cddc226ece1bb5b40a74ba281f3e00e (diff) | |
download | git-a749c0bbef068af339ea1ac8843f8ca307b3dd35.tar.gz |
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>
Diffstat (limited to 't')
-rwxr-xr-x | t/t9700/test.pl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/t/t9700/test.pl b/t/t9700/test.pl index 0d4e366232..1140767b50 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"); |