[Updated] D8800: tests: add tests trying to use dir as style, as %include, and as __base__

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Sat Jul 25 10:04:23 UTC 2020


Closed by commit rHGf512708a9ea8: tests: add tests trying to use dir as style, as %include, and as __base__ (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D8800?vs=22082&id=22130

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D8800/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D8800

AFFECTED FILES
  tests/test-template-map.t

CHANGE DETAILS

diff --git a/tests/test-template-map.t b/tests/test-template-map.t
--- a/tests/test-template-map.t
+++ b/tests/test-template-map.t
@@ -133,6 +133,14 @@
   (available styles: bisect, changelog, compact, default, phases, show, status, xml)
   [255]
 
+Test map inheritance with directory as base
+
+  $ mkdir somedir
+  $ echo "__base__ = somedir" > map-base-dir
+  $ hg log -l1 -T./map-base-dir
+  abort: Is a directory: '$TESTTMP/a/somedir'
+  [255]
+
 Test including a built-in template map
 
   $ cat <<'EOF' > map-include-builtin
@@ -155,6 +163,17 @@
   $ hg log -l1 -T./map-include-nonexistent
   test
 
+Test including a directory as template map
+BROKEN: This should probably be an error just like the bad __base__ above
+
+  $ cat <<'EOF' > map-include-dir
+  > %include somedir
+  > [templates]
+  > changeset = "test\n"
+  > EOF
+  $ hg log -l1 -T./map-include-dir
+  test
+
 Test docheader, docfooter and separator in template map
 
   $ cat <<'EOF' > map-myjson
@@ -1256,6 +1275,12 @@
   abort: specify a template
   [255]
 
+Error if style is a directory:
+
+  $ hg log --style somedir
+  abort: Is a directory: 'somedir'
+  [255]
+
 Error if style missing key:
 
   $ echo 'q = q' > t



To: martinvonz, #hg-reviewers, pulkit
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20200725/1e109d1b/attachment-0002.html>


More information about the Mercurial-patches mailing list