tests/test-command-template.t
changeset 31807 e6eb86b154c5
parent 31765 264baeef3588
child 31882 ba5b74f780d5
--- a/tests/test-command-template.t	Fri Apr 22 21:45:06 2016 +0900
+++ b/tests/test-command-template.t	Fri Apr 22 21:46:33 2016 +0900
@@ -2683,6 +2683,16 @@
   $ hg log -l 1 --template '{if(author, author)|user}\n'
   test
 
+Test index keyword:
+
+  $ hg log -l 2 -T '{index + 10}{files % " {index}:{file}"}\n'
+  10 0:a 1:b 2:fifth 3:fourth 4:third
+  11 0:a
+
+  $ hg branches -T '{index} {branch}\n'
+  0 default
+  1 foo
+
 Test diff function:
 
   $ hg diff -c 8