Diff options
Diffstat (limited to 'tests/t0502-syntax-highlight.sh')
| -rwxr-xr-x | tests/t0502-syntax-highlight.sh | 11 |
1 file changed, 11 insertions, 0 deletions
diff --git a/tests/t0502-syntax-highlight.sh b/tests/t0502-syntax-highlight.sh index c0b4480..cb31bfc 100755 --- a/tests/t0502-syntax-highlight.sh +++ b/tests/t0502-syntax-highlight.sh @@ -32,6 +32,17 @@ do ' done +# A class the filter writes with no rule in the stylesheet colours nothing. +test_expect_success 'every class the filter writes is styled' ' + sed -n "s/^.*= \"\(hl-[a-z]*\)\",$/\1/p" "$EXTENSIONS_DIRECTORY/syntax-highlight.lua" | + sort -u >classes && + test -s classes && + while read class + do + test_grep "^div#cgit \.$class {" "$TEST_OUTPUT_DIRECTORY/../assets/cgit.css" || return 1 + done <classes +' + test_expect_success 'create a repository holding a lexable file' ' test_create_repo repos/fake && ( |
