Diff options
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Check the filter flush on the pages already fetched
The about check already finds the div right before the filtered text, so its copy went, and the tree page is flattened where it was first read.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/t0201-filters.sh23
1 file changed, 7 insertions, 16 deletions
diff --git a/tests/t0201-filters.sh b/tests/t0201-filters.sh
index af2f4fa..a642120 100755
--- a/tests/t0201-filters.sh
+++ b/tests/t0201-filters.sh
@@ -21,8 +21,14 @@ do
cgit_url 'filter-$prefix/tree/a%2bb' >tmp
"
+ # Page output is buffered and has to be flushed as stdout is handed
+ # to a filter and back. A missed flush reorders the page rather than
+ # losing any of it, so the test below watches which side of the
+ # filtered text the surrounding markup lands on.
test_expect_success "check whether the $prefix source filter works" '
- grep "<code>a+b HELLO$" tmp
+ grep "<code>a+b HELLO$" tmp &&
+ tr -d "\n" <tmp >flat.out &&
+ grep "<code>a+b HELLO</code>" flat.out
'
test_expect_success "generate filter-$prefix/about/" "
@@ -48,21 +54,6 @@ do
test_expect_success "check whether the $prefix email filter works for committers" '
grep "<committer@example.com> commit C O MITTER &LT;COMMITTER@EXAMPLE.COM&GT;" tmp
'
-
- # Page output is buffered and has to be flushed as stdout is handed
- # to a filter and back. A missed flush reorders the page rather than
- # losing any of it, so the two tests below watch which side of the
- # filtered text the surrounding markup lands on.
- test_expect_success "the $prefix source filter output stays inside its cell" "
- cgit_url 'filter-$prefix/tree/a%2bb' >tmp &&
- tr -d '\n' <tmp >flat.out &&
- grep '<code>a+b HELLO</code>' flat.out
- "
-
- test_expect_success "the $prefix about filter output stays inside its div" "
- cgit_url 'filter-$prefix/about/' >tmp &&
- grep \"<div id='about'>a+b /filter-$prefix/tree/ HELLO\" tmp
- "
done
test_expect_success 'the blame page goes through the source filter too' '