Diff options
Diffstat (limited to 'tests/t0502-syntax-highlight.sh')
| -rwxr-xr-x | tests/t0502-syntax-highlight.sh | 13 |
1 file changed, 7 insertions, 6 deletions
diff --git a/tests/t0502-syntax-highlight.sh b/tests/t0502-syntax-highlight.sh index dbb7bb0..186d0a8 100755 --- a/tests/t0502-syntax-highlight.sh +++ b/tests/t0502-syntax-highlight.sh @@ -54,13 +54,14 @@ test_expect_success 'place the fake lexers beside a config naming the filter' ' ' test_expect_success CGIT_LUA 'the tree view is highlighted' ' - cgit_url "fake/tree/hello.fake" >tmp && - grep "<span class=.hl-keyword.>if</span>" tmp && - grep "<span class=.hl-number.>42</span>" tmp + 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_expect_success CGIT_LUA 'bytes between tokens reach the page escaped' ' - grep "<span class=.hl-number.>42</span> & " tmp + cgit_ok_url "fake/tree/hello.fake" >tmp && + test_grep "<span class=.hl-number.>42</span> & " tmp ' # A missing scintillua leaves the filter with nothing to highlight with, and @@ -81,8 +82,8 @@ test_expect_success CGIT_LUA 'a lone carriage return reaches the page as an esca git add cr.fake && git commit -m "add a lone carriage return" ) && - cgit_url "fake/tree/cr.fake" >tmp && - grep "<span class=.hl-keyword.>if</span><span class=.escape.>\\\\r</span>" tmp + cgit_ok_url "fake/tree/cr.fake" >tmp && + test_grep "<span class=.hl-keyword.>if</span><span class=.escape.>\\\\r</span>" tmp ' test_done |
