summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorThomas Rast <trast@student.ethz.ch>2011-12-12 18:09:14 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-12-19 20:19:57 (GMT)
commita463aefa353870dd4325ff86ab7da0195521341b (patch)
tree5ffb519a6cbe50e34cdc023ba2cc9fc38090f627 /t
parent0510480510b181216d565ebcedea471d50c200b1 (diff)
downloadgit-a463aefa353870dd4325ff86ab7da0195521341b.zip
git-a463aefa353870dd4325ff86ab7da0195521341b.tar.gz
git-a463aefa353870dd4325ff86ab7da0195521341b.tar.bz2
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>
Diffstat (limited to 't')
-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 ee01eb9..10172ae 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;