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

login
register
mail settings
Submitter Yuya Nishihara
Date June 16, 2017, 4:37 p.m.
Message ID <06b1ac59547e8ef086ba.1497631028@mimosa>
Download mbox | patch
Permalink /patch/21429/
State Accepted
Headers show

Comments

Yuya Nishihara - June 16, 2017, 4:37 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@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.

Patch

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]