tests/test-command-template.t
changeset 20370 aa51392da507
parent 20369 9c6b86dd2ed2
child 20518 1e43f15a647f
--- a/tests/test-command-template.t	Fri Jan 17 00:10:37 2014 -0800
+++ b/tests/test-command-template.t	Fri Jan 17 00:16:48 2014 -0800
@@ -1637,3 +1637,17 @@
   $ hg log --template '{shortest(node, 10)}\n'
   d97c383ae3
   f7769ec2ab
+
+Test pad function
+
+  $ hg log --template '{pad(rev, 20)} {author|user}\n'
+  1                    test
+  0                    test
+
+  $ hg log --template '{pad(rev, 20, " ", True)} {author|user}\n'
+                     1 test
+                     0 test
+
+  $ hg log --template '{pad(rev, 20, "-", False)} {author|user}\n'
+  1------------------- test
+  0------------------- test