From: Thomas Rast Date: Mon, 12 Dec 2011 18:09:14 +0000 (+0100) Subject: test-terminal: set output terminals to raw mode X-Git-Tag: v1.7.9-rc0~16^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a463aefa353870dd4325ff86ab7da0195521341b;p=git.git 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 Acked-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- diff --git a/t/test-terminal.perl b/t/test-terminal.perl index ee01eb957..10172aee1 100755 --- a/t/test-terminal.perl +++ b/t/test-terminal.perl @@ -69,6 +69,10 @@ if ($#ARGV < 1) { } my $master_out = new IO::Pty; my $master_err = new IO::Pty; +$master_out->set_raw(); +$master_err->set_raw(); +$master_out->slave->set_raw(); +$master_err->slave->set_raw(); my $pid = start_child(\@ARGV, $master_out->slave, $master_err->slave); close $master_out->slave; close $master_err->slave;