From 2851eb72d7bc14445ba632e01a157b04ece0ff57 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Mon, 10 Aug 2026 21:37:51 -1000 Subject: Tidy the test comments and shell portability --- tests/t0111-filter.sh | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'tests/t0111-filter.sh') diff --git a/tests/t0111-filter.sh b/tests/t0111-filter.sh index da4172f..88533f4 100755 --- a/tests/t0111-filter.sh +++ b/tests/t0111-filter.sh @@ -1,5 +1,11 @@ #!/bin/sh +# Checks the source, about, commit and email filters, which hand a piece of +# page content to an outside program before it is written out. The whole +# body runs once per kind of filter, the exec kind always and the lua kind +# only where cgit was built with lua, because both have to produce the same +# page from the same repository. + test_description='Check filtered content' . ./setup.sh @@ -42,11 +48,13 @@ do grep " commit C O MITTER <COMMITTER@EXAMPLE.COM>" tmp ' - # Page output is buffered, so anything written before a filter opens has - # to leave the buffer before the filter takes over stdout, and anything - # written while it is open has to leave before stdout is handed back. - # A missed flush reorders the page rather than losing it, so check that - # the markup around the filtered text is still on the right side of it. + # Page output is buffered, so whatever was written before a filter + # opens has to leave the buffer before the filter takes over stdout, + # and whatever was written while it was open has to leave before + # stdout is handed back, since those bytes are meant for the filter. + # A missed flush reorders the page rather than losing any of it, + # so the two tests below confirm that the markup around the filtered + # text is still on the side of it that it belongs on. test_expect_success "the $prefix source filter output stays inside its cell" " cgit_url 'filter-$prefix/tree/a%2bb' >tmp && tr -d '\n' flat.out && -- cgit 2.12.1