Revision 7e27173ef9152fe93d3fc42b60febbc782e4db16 authored by Jeff King on 14 March 2014, 21:57:23 UTC, committed by Junio C Hamano on 14 March 2014, 22:23:49 UTC
When lib-terminal.sh is sourced by a test script, we immediately set up the TTY prerequisite. We do so inside a test_expect_success, because that nicely isolates any generated output. However, this early test can interfere with a script that later wants to skip all tests (e.g., t5541 then goes on to set up the httpd server, and wants to skip_all if that fails). TAP output doesn't let us skip everything after we have already run at least one test. We could fix this by reordering the inclusion of lib-terminal.sh in t5541 to go after the httpd setup. That solves this case, but we might eventually hit a case with circular dependencies, where either lib-*.sh include might want to skip_all after the other has run a test. So instead, let's just remove the ordering constraint entirely by doing the setup inside a test_lazy_prereq construct, rather than in a regular test. We never cared about the test outcome anyway (it was written to always succeed). Note that in addition to setting up the prerequisite, the current test also defines test_terminal. Since we can't affect the environment from a lazy_prereq, we have to hoist that out. We previously depended on it _not_ being defined when the TTY prereq isn't set as a way to ensure that tests properly declare their dependency on TTY. However, we still cover the case (see the in-code comment for details). Reported-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 7bbc4e8
File | Mode | Size |
---|---|---|
araxis | -rw-r--r-- | 392 bytes |
bc3 | -rw-r--r-- | 401 bytes |
codecompare | -rw-r--r-- | 387 bytes |
deltawalker | -rw-r--r-- | 628 bytes |
diffmerge | -rw-r--r-- | 286 bytes |
diffuse | -rw-r--r-- | 282 bytes |
ecmerge | -rw-r--r-- | 340 bytes |
emerge | -rw-r--r-- | 415 bytes |
gvimdiff | -rw-r--r-- | 29 bytes |
gvimdiff2 | -rw-r--r-- | 29 bytes |
kdiff3 | -rw-r--r-- | 499 bytes |
kompare | -rw-r--r-- | 83 bytes |
meld | -rw-r--r-- | 680 bytes |
opendiff | -rw-r--r-- | 301 bytes |
p4merge | -rw-r--r-- | 651 bytes |
tkdiff | -rw-r--r-- | 224 bytes |
tortoisemerge | -rw-r--r-- | 638 bytes |
vimdiff | -rw-r--r-- | 625 bytes |
vimdiff2 | -rw-r--r-- | 29 bytes |
xxdiff | -rw-r--r-- | 618 bytes |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...