git-count-objects.txt: describe each line in -v output
[git/debian.git] / t / lib-terminal.sh
blob58d911d21b894ba05e878e6efbc234071795c600
1 #!/bin/sh
3 test_expect_success PERL 'set up terminal for tests' '
4 # Reading from the pty master seems to get stuck _sometimes_
5 # on Mac OS X 10.5.0, using Perl 5.10.0 or 5.8.9.
7 # Reproduction recipe: run
9 # i=0
10 # while ./test-terminal.perl echo hi $i
11 # do
12 # : $((i = $i + 1))
13 # done
15 # After 2000 iterations or so it hangs.
16 # https://rt.cpan.org/Ticket/Display.html?id=65692
18 if test "$(uname -s)" = Darwin
19 then
21 elif
22 "$PERL_PATH" "$TEST_DIRECTORY"/test-terminal.perl \
23 sh -c "test -t 1 && test -t 2"
24 then
25 test_set_prereq TTY &&
26 test_terminal () {
27 if ! test_declared_prereq TTY
28 then
29 echo >&4 "test_terminal: need to declare TTY prerequisite"
30 return 127
32 "$PERL_PATH" "$TEST_DIRECTORY"/test-terminal.perl "$@"