From a463aefa353870dd4325ff86ab7da0195521341b Mon Sep 17 00:00:00 2001 From: Thomas Rast Date: Mon, 12 Dec 2011 19:09:14 +0100 Subject: [PATCH] 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 --- t/test-terminal.perl | 4 ++++ 1 file changed, 4 insertions(+) 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; -- 2.30.2