[PATCH 2 of 6] test-command-template: rewrite recursion tests by using a map file

Yuya Nishihara yuya at tcha.org
Fri Jun 16 12:37:08 EDT 2017


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1494060065 -32400
#      Sat May 06 17:41:05 2017 +0900
# Node ID 06b1ac59547e8ef086bae9bc51740318c7661e7e
# Parent  a9aa703f63dc4bd994bb82c980cb5f0847b9a6ba
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.

diff --git a/tests/test-command-template.t b/tests/test-command-template.t
--- a/tests/test-command-template.t
+++ b/tests/test-command-template.t
@@ -1180,7 +1180,10 @@ Check that recursive reference does not 
 
  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 @@ Check that recursive reference does not 
 
  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]
 


More information about the Mercurial-devel mailing list