diff options
Diffstat (limited to 'tests')
-rwxr-xr-xtests/t0103-log.sh10
1 file changed, 9 insertions, 1 deletion
diff --git a/tests/t0103-log.sh b/tests/t0103-log.sh
index 08f9ddd..ed92a76 100755
--- a/tests/t0103-log.sh
+++ b/tests/t0103-log.sh
@@ -46,7 +46,8 @@ test_expect_success 'no links with space in arg' '! grep "q=commit 1" tmp'
test_expect_success 'commit 2 is not visible' '! grep "commit 2" tmp'
# Following a file diffs each commit for the name the file had there, so the
-# root commit that created it has to be diffed too.
+# root commit that created it has to be diffed too, and paging has to go on
+# asking about the name the visitor followed rather than the older one.
test_expect_success 'set up a renamed file to follow' '
test_create_repo repos/fol &&
(
@@ -83,4 +84,11 @@ test_expect_success 'a followed log reaches the root commit' '
grep ">create a<" tmp
'
+test_expect_success 'the pager of a followed log keeps the name followed' '
+ CGIT_CONFIG="$PWD/folrc" QUERY_STRING="url=fol/log/b.txt&follow=1&ofs=3" cgit >tmp &&
+ grep ">edit a 3<" tmp &&
+ grep "href=./fol/log/b.txt?follow=1.>\[prev\]" tmp &&
+ grep "href=./fol/log/b.txt?ofs=6&amp;follow=1.>\[next\]" tmp
+'
+
test_done