test-command-template: rewrite recursion tests by using a map file
authorYuya Nishihara <yuya@tcha.org>
Sat, 06 May 2017 17:41:05 +0900
changeset 32874 dddba6f3e59c
parent 32873 2ecce24dfcd3
child 32875 c8f2cf18b82e
test-command-template: rewrite recursion tests by using a map file A literal template will be unnamed soon, so no recursion will be practically made by using -T option.
tests/test-command-template.t
--- a/tests/test-command-template.t	Sat Apr 22 19:56:47 2017 +0900
+++ b/tests/test-command-template.t	Sat May 06 17:41:05 2017 +0900
@@ -1180,7 +1180,10 @@
 
  common mistake:
 
-  $ hg log -T '{changeset}\n'
+  $ cat << EOF > issue4758
+  > changeset = '{changeset}\n'
+  > EOF
+  $ hg log --style ./issue4758
   abort: recursive reference 'changeset' in template
   [255]
 
@@ -1196,7 +1199,10 @@
 
  buildmap() -> gettemplate(), where no thunk was made:
 
-  $ hg log -T '{files % changeset}\n'
+  $ cat << EOF > issue4758
+  > changeset = '{files % changeset}\n'
+  > EOF
+  $ hg log --style ./issue4758
   abort: recursive reference 'changeset' in template
   [255]