From 3f2d42fa3760ed5cee27fb253ed1425a0a370fa2 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 7 Nov 2026 11:24:47 -1000 Subject: Check the index search and sort see descriptions The test looked only at the rows, which show the file's text wherever it is read, so moving the read below the search or the sort passed. --- tests/t0101-index.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/t0101-index.sh') diff --git a/tests/t0101-index.sh b/tests/t0101-index.sh index 4a8bdb3..ca0c88d 100755 --- a/tests/t0101-index.sh +++ b/tests/t0101-index.sh @@ -190,4 +190,16 @@ test_expect_success 'a repository without repo.desc reads its description file' grep "" tmp ' +# The search and the sort look at descriptions too, so the file has to be +# read before either of them. +test_expect_success 'the search and the sort see a description file' ' + cgit_ok describedrc "q=told" >tmp && + test_grep "href=./described/.>told by the file" tmp && + test_grep ! ">overridden" tmp && + cgit_ok describedrc "s=desc" >tmp && + sed -n "s/.*class=.col-name toplevel-repo.>\([a-z]*\)<\/a>.*/\1/p" tmp >order && + printf "%s\n" placeholder overridden described >expect && + test_cmp expect order +' + test_done -- cgit 2.12.1