test-terminal: set output terminals to raw mode
Not setting them to raw mode causes funny things to happen, such as \n -> \r\n translation: ./test-terminal.perl echo foo | xxd 0000000: 666f 6f0d 0a foo.. (Notice the added 0d.) To avoid this, set the (pseudo)terminal to raw mode. Note that the IO::Pty docs recommend doing it on both master and slave. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Acked-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Thomas Rast committed
Dec 12, 2011 at 19:09 UTC
a463aefa353870dd4325ff86ab7da0195521341b
1 file changed
+4
t/test-terminal.perl
+4
@@ -69,6 +69,10 @@ if ($#ARGV < 1) {
69
}
70
my $master_out = new IO::Pty;
71
my $master_err = new IO::Pty;
72
+$master_out->set_raw();
73
+$master_err->set_raw();
74
+$master_out->slave->set_raw();
75
+$master_err->slave->set_raw();
76
my $pid = start_child(\@ARGV, $master_out->slave, $master_err->slave);
77
close $master_out->slave;
78
close $master_err->slave;