From 4253ab2a152c39814551e3dd5fa35e5783b8e037 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 17 Oct 2026 12:53:19 -1000 Subject: Test the features the suite never reached Index sorting, the commit graph, the stats periods past a week, the hex dump of a binary file and a Lua filter's html_url_arg and html_include ran in no test. --- tests/t0104-tree.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'tests/t0104-tree.sh') diff --git a/tests/t0104-tree.sh b/tests/t0104-tree.sh index e92b2a2..b48c394 100755 --- a/tests/t0104-tree.sh +++ b/tests/t0104-tree.sh @@ -135,4 +135,23 @@ test_expect_success 'a long directory chain ends on a link' ' ! grep " / " tmp ' +test_expect_success 'a binary file in the tree shows as a hex dump' ' + test_create_repo repos/bin && + ( + cd repos/bin && + printf "\\000\\001\\002bin" >blob.bin && + git add blob.bin && + git commit -m binary + ) && + { + echo "virtual-root=/" && + echo "cache-size=0" && + echo "repo.url=bin" && + echo "repo.path=$PWD/repos/bin/.git" + } >binrc && + CGIT_CONFIG="$PWD/binrc" QUERY_STRING="url=bin/tree/blob.bin" cgit >tmp && + grep "" tmp && + grep "
0000 00 01 02 62 69 6e" tmp +' + test_done -- cgit