Mercurial > public > mercurial-scm > hg
diff tests/test-command-template.t @ 35539:d1aae6d4efc5 stable
templatefilters: fix doc of basename()
os.path.basename() does NOT strip trailing slashes.
> Note that the result of this function is different from the Unix basename
> program; where basename for '/foo/bar/' returns 'bar', the basename()
> function returns an empty string ('').
https://docs.python.org/2.7/library/os.path.html#os.path.basename
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 07 Jan 2018 12:07:29 +0900 |
parents | 1644623ab096 |
children | 6d65cef5b038 |
line wrap: on
line diff
--- a/tests/test-command-template.t Sun Jan 07 15:56:58 2018 +0900 +++ b/tests/test-command-template.t Sun Jan 07 12:07:29 2018 +0900 @@ -2218,6 +2218,11 @@ $ cd .. $ rm -rf unstable-hash +Filename filters: + + $ hg debugtemplate '{"foo/bar"|basename}|{"foo/"|basename}|{"foo"|basename}|\n' + bar||foo| + Add a dummy commit to make up for the instability of the above: $ echo a > a