diff tests/test-command-template.t @ 31887:f7b3677f66cd

templater: port pad() to take keyword arguments This is another example where keyword arguments can be actually useful.
author Yuya Nishihara <yuya@tcha.org>
date Mon, 03 Apr 2017 22:23:52 +0900
parents bdda942f4b9c
children 932241b8c644
line wrap: on
line diff
--- a/tests/test-command-template.t	Mon Apr 03 21:22:39 2017 +0900
+++ b/tests/test-command-template.t	Mon Apr 03 22:23:52 2017 +0900
@@ -146,6 +146,9 @@
   hg: parse error: can't use a key-value pair in this context
   [255]
 
+  $ hg debugtemplate '{pad("foo", width=10, left=true)}\n'
+         foo
+
 Call function which takes named arguments by filter syntax:
 
   $ hg debugtemplate '{" "|separate}'