1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-20 16:04:53 +01:00
git/t/lib-terminal.sh

20 lines
425 B
Bash
Raw Normal View History

#!/bin/sh
test_expect_success 'set up terminal for tests' '
if
test_have_prereq PERL &&
"$PERL_PATH" "$TEST_DIRECTORY"/test-terminal.perl \
sh -c "test -t 1 && test -t 2"
then
test_set_prereq TTY &&
test_terminal () {
if ! test_declared_prereq TTY
then
echo >&4 "test_terminal: need to declare TTY prerequisite"
return 127
fi
"$PERL_PATH" "$TEST_DIRECTORY"/test-terminal.perl "$@"
}
fi
'