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

login
register
mail settings
Submitter Matt Mackall
Date June 10, 2015, 11:09 p.m.
Message ID <989700a71f18297b69a0.1433977789@ruin.waste.org>
Download mbox | patch
Permalink /patch/9597/
State Accepted
Headers show

Comments

Matt Mackall - June 10, 2015, 11:09 p.m.
# HG changeset patch
# User Matt Mackall <mpm@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
Pierre-Yves David - June 11, 2015, 12:23 a.m.
On 06/10/2015 04:09 PM, Matt Mackall wrote:
> # HG changeset patch
> # User Matt Mackall <mpm@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

pushed to the clowncopter, thanks.

Patch

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