diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-11-17 15:01:00 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-11-17 15:01:00 -0800 |
commit | 0510480510b181216d565ebcedea471d50c200b1 (patch) | |
tree | bf7beeb2fc8eca0e3692aedd15d9589b3de8ea86 /t/lib-terminal.sh | |
parent | ba0254cb32537b7a7e92854a51256475ee83cdda (diff) | |
parent | d7c411b71d727600d2f031fec9723873ae93c1c7 (diff) | |
download | git-0510480510b181216d565ebcedea471d50c200b1.tar.gz git-0510480510b181216d565ebcedea471d50c200b1.tar.xz |
Merge branch 'jk/push-progress'
* jk/push-progress:
push: pass --progress down to git-pack-objects
t5523-push-upstream: test progress messages
t5523-push-upstream: add function to ensure fresh upstream repo
test_terminal: ensure redirections work reliably
test_terminal: catch use without TTY prerequisite
test-lib: allow test code to check the list of declared prerequisites
tests: test terminal output to both stdout and stderr
tests: factor out terminal handling from t7006
Diffstat (limited to 't/lib-terminal.sh')
-rw-r--r-- | t/lib-terminal.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/t/lib-terminal.sh b/t/lib-terminal.sh new file mode 100644 index 000000000..c383b57ed --- /dev/null +++ b/t/lib-terminal.sh @@ -0,0 +1,19 @@ +#!/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 +' |