From c16fb3d8a6a533a25e774431c6b292e7525c1bba Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 7 Nov 2026 10:55:32 -1000 Subject: Check that the blame view is highlighted Blame runs the same source filter, and only the tree view had ever been rendered through it. --- tests/t0502-syntax-highlight.sh | 7 +++++++ 1 file changed, 7 insertions(+) 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 ".<b>." tmp ' +test_expect_success CGIT_LUA 'the blame view is highlighted too' ' + cgit_ok_url "fake/blame/hello.fake" >tmp && + test_grep "if" tmp && + test_grep ".<b>." tmp +' + test_expect_success CGIT_LUA 'bytes between tokens reach the page escaped' ' cgit_ok_url "fake/tree/hello.fake" >tmp && test_grep "42 & " tmp -- cgit 2.12.1