[PATCH 5 of 5] tests: test basic template support for status

Matt Mackall mpm at selenic.com
Wed Jun 10 18:09:49 CDT 2015


# HG changeset patch
# User Matt Mackall <mpm at selenic.com>
# Date 1433965089 18000
#      Wed Jun 10 14:38:09 2015 -0500
# Node ID 989700a71f18297b69a06d5e47166d231afe2623
# Parent  dfd4ad8ad468bbff6f39251ae50373b293ca4d0f
tests: test basic template support for status

diff -r dfd4ad8ad468 -r 989700a71f18 tests/test-status.t
--- a/tests/test-status.t	Wed Jun 10 14:35:05 2015 -0500
+++ b/tests/test-status.t	Wed Jun 10 14:38:09 2015 -0500
@@ -212,6 +212,33 @@
   $ mkdir ignoreddir
   $ touch ignoreddir/file
 
+Test templater support:
+
+  $ hg status -AT "[{status}]\t{if(copy, '{copy} -> ')}{path}\n"
+  [M]	.hgignore
+  [A]	added
+  [A]	modified -> copied
+  [R]	removed
+  [!]	deleted
+  [?]	ignored
+  [?]	unknown
+  [I]	ignoreddir/file
+  [C]	modified
+  $ hg status -AT default
+  M .hgignore
+  A added
+  A copied
+    modified
+  R removed
+  ! deleted
+  ? ignored
+  ? unknown
+  I ignoreddir/file
+  C modified
+  $ hg status -T compact
+  abort: "status" not in template map
+  [255]
+
 hg status ignoreddir/file:
 
   $ hg status ignoreddir/file


More information about the Mercurial-devel mailing list