From 8273c8b176e9fc2cb2898b7ee76af2a8558db4ff Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Wed, 12 Aug 2026 19:26:32 -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 v2.8.0