test-lib: add the test_pause convenience function
commitc4d2539af751ed394ee68c02fe688e75c647c5fe
authorJens Lehmann <Jens.Lehmann@web.de>
Tue, 17 Jan 2012 21:04:31 +0000 (17 22:04 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 17 Jan 2012 23:15:35 +0000 (17 15:15 -0800)
treecb9658bddd4e0ff8d5c47ae4bfef7dd94255bf1e
parent52b9d2cf7fbde061bf0d3336e3a89d7333d5b23d
test-lib: add the test_pause convenience function

Since 781f76b15 (test-lib: redirect stdin of tests) you can't simply put a
"bash &&" into a test for debugging purposes anymore. Instead you'll have
to use "bash <&6 >&3 2>&4".

As that invocation is not that easy to remember add the test_pause
convenience function. It invokes "$SHELL_PATH" to provide a sane shell
for the user.

This function also checks if the -v flag is given and will error out if
that is not the case instead of letting the test hang until ^D is pressed.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/README
t/test-lib.sh