Skip to content

test_terminal: check that TTY prerequisite is declared

Jonathan Nieder git 1 version In review

Get series with b4
b4 am 20101014203721.GA28958@burratino

Versions newest first

  1. v1 Latest2 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2test-lib: allow test code to check the list of declared prerequisitest/test-lib.sh+19 -72 replies
2/2test_terminal: catch use without TTY prerequisitet/t7006-pager.sh+12 -80 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH/RFC 0/2] test_terminal: check that TTY prerequisite is declared
Quoted 8 lines · Jeff King
Quoted 2 lines · Jonathan Nieder

Missing TTY prerequisite. (Do you think test_terminal should check $prereq to prevent this?)

Oops, good catch. I think we should already catch it, as test_terminal will not be defined at all in the no-tty case. We could print a nicer message, but

I rather meant something like this.

Patch 1 exposes the internal $prereq variable from test_expect_(success|failure). Maybe it should be called GIT_TEST_something to avoid trampling other programs' namespaces? Not sure.

Patch 2 introduces some magic autodetection so people that never run tests without -v can still notice the missing TTY prereqs.

Jonathan Nieder (2):
test-lib: allow test code to check the list of declared prerequisites
test_terminal: catch use without TTY prerequisite

 t/t7006-pager.sh |   20 ++++++++++++--------
 t/test-lib.sh    |   26 +++++++++++++++++++-------
 2 files changed, 31 insertions(+), 15 deletions(-)
Signature · 1 line
1.7.2.3