Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Check that markup inside a token is escaped
Every escape the checks looked at sat between tokens or in the tail a
lexer left untagged, so a filter that escaped only those would have
passed with a string literal reaching the page raw.
Diffstat (limited to 'tests/t0502-syntax-highlight.sh')
| -rwxr-xr-x | tests/t0502-syntax-highlight.sh | 5 |
1 file changed, 3 insertions, 2 deletions
diff --git a/tests/t0502-syntax-highlight.sh b/tests/t0502-syntax-highlight.sh index 186d0a8..4b32f82 100755 --- a/tests/t0502-syntax-highlight.sh +++ b/tests/t0502-syntax-highlight.sh @@ -35,7 +35,7 @@ test_expect_success 'create a repository holding a lexable file' ' test_create_repo repos/fake && ( cd repos/fake && - echo "if 42 & zz" >hello.fake && + echo "if 42 & zz $SQ<b>$SQ" >hello.fake && git add hello.fake && git commit -m "add hello" ) @@ -56,7 +56,8 @@ test_expect_success 'place the fake lexers beside a config naming the filter' ' test_expect_success CGIT_LUA 'the tree view is highlighted' ' cgit_ok_url "fake/tree/hello.fake" >tmp && test_grep "<span class=.hl-keyword.>if</span>" tmp && - test_grep "<span class=.hl-number.>42</span>" tmp + test_grep "<span class=.hl-number.>42</span>" tmp && + test_grep "<span class=.hl-string.>.<b>.</span>" tmp ' test_expect_success CGIT_LUA 'bytes between tokens reach the page escaped' ' |
