2010-10-16 20:36:56 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
test_expect_success 'set up terminal for tests' '
|
2010-10-17 02:38:07 +02:00
|
|
|
if
|
2010-10-16 20:36:56 +02:00
|
|
|
test_have_prereq PERL &&
|
|
|
|
"$PERL_PATH" "$TEST_DIRECTORY"/test-terminal.perl \
|
2010-10-16 20:36:57 +02:00
|
|
|
sh -c "test -t 1 && test -t 2"
|
2010-10-16 20:36:56 +02:00
|
|
|
then
|
2010-10-17 02:38:07 +02:00
|
|
|
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 "$@"
|
|
|
|
}
|
2010-10-16 20:36:56 +02:00
|
|
|
fi
|
|
|
|
'
|