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.
--- 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]