test-terminal: set output terminals to raw mode
commita463aefa353870dd4325ff86ab7da0195521341b
authorThomas Rast <trast@student.ethz.ch>
Mon, 12 Dec 2011 18:09:14 +0000 (12 19:09 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 19 Dec 2011 20:19:57 +0000 (19 12:19 -0800)
tree5ffb519a6cbe50e34cdc023ba2cc9fc38090f627
parent0510480510b181216d565ebcedea471d50c200b1
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>
t/test-terminal.perl