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