changeset 32892:dddba6f3e59c

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.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 06 May 2017 17:41:05 +0900
parents 2ecce24dfcd3
children c8f2cf18b82e
files tests/test-command-template.t
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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]