Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Check that the blame view is highlighted
Blame runs the same source filter, and only the tree view had ever
been rendered through it.
| -rwxr-xr-x | tests/t0502-syntax-highlight.sh | 7 |
1 file changed, 7 insertions, 0 deletions
diff --git a/tests/t0502-syntax-highlight.sh b/tests/t0502-syntax-highlight.sh index cb31bfc..cbe8f3b 100755 --- a/tests/t0502-syntax-highlight.sh +++ b/tests/t0502-syntax-highlight.sh @@ -59,6 +59,7 @@ test_expect_success 'place the fake lexers beside a config naming the filter' ' cat >cgitrc <<-EOF virtual-root=/ cache-size=0 + enable-blame=1 repo.url=fake repo.path=$PWD/repos/fake/.git repo.source-filter=lua:$EXTENSIONS_DIRECTORY/syntax-highlight.lua @@ -72,6 +73,12 @@ test_expect_success CGIT_LUA 'the tree view is highlighted' ' test_grep "<span class=.hl-string.>.<b>.</span>" tmp ' +test_expect_success CGIT_LUA 'the blame view is highlighted too' ' + cgit_ok_url "fake/blame/hello.fake" >tmp && + test_grep "<span class=.hl-keyword.>if</span>" tmp && + test_grep "<span class=.hl-string.>.<b>.</span>" tmp +' + test_expect_success CGIT_LUA 'bytes between tokens reach the page escaped' ' cgit_ok_url "fake/tree/hello.fake" >tmp && test_grep "<span class=.hl-number.>42</span> & " tmp |
