1#!/bin/sh
23
test_expect_success 'set up terminal for tests' '
4if
5test_have_prereq PERL &&
6"$PERL_PATH" "$TEST_DIRECTORY"/test-terminal.perl \
7sh -c "test -t 1 && test -t 2"
8then
9test_set_prereq TTY &&
10test_terminal () {
11if ! test_declared_prereq TTY
12then
13echo >&4 "test_terminal: need to declare TTY prerequisite"
14return 127
15fi
16"$PERL_PATH" "$TEST_DIRECTORY"/test-terminal.perl "$@"
17}
18fi
19'