diff tests/test-command-template.t @ 36246:9ee10b3284da

templatefilters: add dirname() filter This is different from stripdir() in that the last component is always removed.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 07 Jan 2018 12:09:33 +0900
parents 6d65cef5b038
children e8d37838f5df
line wrap: on
line diff
--- a/tests/test-command-template.t	Sun Jan 07 11:21:25 2018 +0900
+++ b/tests/test-command-template.t	Sun Jan 07 12:09:33 2018 +0900
@@ -2232,6 +2232,10 @@
 
   $ hg debugtemplate '{"foo/bar"|basename}|{"foo/"|basename}|{"foo"|basename}|\n'
   bar||foo|
+  $ hg debugtemplate '{"foo/bar"|dirname}|{"foo/"|dirname}|{"foo"|dirname}|\n'
+  foo|foo||
+  $ hg debugtemplate '{"foo/bar"|stripdir}|{"foo/"|stripdir}|{"foo"|stripdir}|\n'
+  foo|foo|foo|
 
 Add a dummy commit to make up for the instability of the above: