summaryrefslogtreecommitdiff
path: root/t/test-terminal.perl
diff options
context:
space:
mode:
authorThomas Rast <trast@student.ethz.ch>2011-12-12 19:09:14 +0100
committerJunio C Hamano <gitster@pobox.com>2011-12-19 12:19:57 -0800
commita463aefa353870dd4325ff86ab7da0195521341b (patch)
tree5ffb519a6cbe50e34cdc023ba2cc9fc38090f627 /t/test-terminal.perl
parent0510480510b181216d565ebcedea471d50c200b1 (diff)
downloadgit-a463aefa353870dd4325ff86ab7da0195521341b.tar.gz
test-terminal: set output terminals to raw modetr/pty-all
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>
Diffstat (limited to 't/test-terminal.perl')
-rwxr-xr-xt/test-terminal.perl4
1 files changed, 4 insertions, 0 deletions
diff --git a/t/test-terminal.perl b/t/test-terminal.perl
index ee01eb957e..10172aee18 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;