]>
git.cameronkatri.com Git - cgit.git/blob - tests/t0111-filter.sh
3 test_description
='Check filtered content'
7 if [ $CGIT_HAS_LUA -eq 1 ]; then
8 prefixes
="$prefixes lua"
11 for prefix
in $prefixes
13 test_expect_success
"generate filter-$prefix/tree/a%2bb" "
14 cgit_url 'filter-$prefix/tree/a%2bb' >tmp
17 test_expect_success
"check whether the $prefix source filter works" '
18 grep "<code>a+b HELLO$" tmp
21 test_expect_success
"generate filter-$prefix/about/" "
22 cgit_url 'filter-$prefix/about/' >tmp
25 test_expect_success
"check whether the $prefix about filter works" '
26 grep "<div id='"'"'summary'"'"'>a+b HELLO$" tmp
29 test_expect_success
"generate filter-$prefix/commit/" "
30 cgit_url 'filter-$prefix/commit/' >tmp
33 test_expect_success
"check whether the $prefix commit filter works" '
34 grep "<div class='"'"'commit-subject'"'"'>ADD A+B" tmp
37 test_expect_success
"check whether the $prefix email filter works for authors" '
38 grep "<author@example.com> commit A U THOR <AUTHOR@EXAMPLE.COM>" tmp
41 test_expect_success
"check whether the $prefix email filter works for committers" '
42 grep "<committer@example.com> commit C O MITTER <COMMITTER@EXAMPLE.COM>" tmp