diff options
| author | Patrick Steinhardt <ps@pks.im> | 2025-06-02 08:44:41 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-06-02 07:51:41 -0700 |
| commit | faac9d46e0e2e87d87b0b4e2b9afbf68deaf234d (patch) | |
| tree | bd1bbf0bf636cc8530a2dbded2be24d5f40922fb /t/t9500-gitweb-standalone-no-errors.sh | |
| parent | 8613c2bb6cd16ef530dc5dd74d3b818a1ccbf1c0 (diff) | |
| download | git-faac9d46e0e2e87d87b0b4e2b9afbf68deaf234d.tar.gz | |
t: stop announcing prereqs
We have a couple of cases where our tests end up announcing that a
certain prerequisite is or isn't fulfilled. While this is supposed to
help the developer it has the downside that it breaks the TAP format.
We could convert these cases to just have a "#" prefix, but it feels
rather unlikely that these are generally useful in the first place. We
already do announce why a specific test is being skipped, so we should
try to use this mechanism to the best extent possible.
Stop announcing these prereqs to fix the TAP format. Where possible,
convert the tests to rely on the prerequisites themselves to announce
why a test ran or didn't ran.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9500-gitweb-standalone-no-errors.sh')
| -rwxr-xr-x | t/t9500-gitweb-standalone-no-errors.sh | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/t/t9500-gitweb-standalone-no-errors.sh b/t/t9500-gitweb-standalone-no-errors.sh index 7679780fb8..578d6c8b32 100755 --- a/t/t9500-gitweb-standalone-no-errors.sh +++ b/t/t9500-gitweb-standalone-no-errors.sh @@ -700,19 +700,17 @@ test_expect_success \ # ---------------------------------------------------------------------- # syntax highlighting +test_lazy_prereq HIGHLIGHT ' + highlight_version=$(highlight --version </dev/null 2>/dev/null) && + test -n "$highlight_version" +' -highlight_version=$(highlight --version </dev/null 2>/dev/null) -if [ $? -eq 127 ]; then - say "Skipping syntax highlighting tests: 'highlight' not found" -elif test -z "$highlight_version"; then - say "Skipping syntax highlighting tests: incorrect 'highlight' found" -else - test_set_prereq HIGHLIGHT +test_expect_success HIGHLIGHT ' cat >>gitweb_config.perl <<-\EOF our $highlight_bin = "highlight"; - $feature{'highlight'}{'override'} = 1; + $feature{"highlight"}{"override"} = 1; EOF -fi +' test_expect_success HIGHLIGHT \ 'syntax highlighting (no highlight, unknown syntax)' \ |
