Mercurial > public > mercurial-scm > hg-stable
diff tests/test-template-functions.t @ 38440:6a8ed5c7e112
tests: fold test-template-filters.t into test-template-functions.t
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 16 Jun 2018 14:10:12 +0900 |
parents | 70f551a3f52e |
children | b6294c113794 |
line wrap: on
line diff
--- a/tests/test-template-functions.t Sat Jun 16 13:17:11 2018 +0900 +++ b/tests/test-template-functions.t Sat Jun 16 14:10:12 2018 +0900 @@ -216,6 +216,32 @@ $ hg debugtemplate '{"foo/bar"|stripdir}|{"foo/"|stripdir}|{"foo"|stripdir}|\n' foo|foo|foo| +commondir() filter: + + $ hg debugtemplate '{""|splitlines|commondir}\n' + + $ hg debugtemplate '{"foo/bar\nfoo/baz\nfoo/foobar\n"|splitlines|commondir}\n' + foo + $ hg debugtemplate '{"foo/bar\nfoo/bar\n"|splitlines|commondir}\n' + foo + $ hg debugtemplate '{"/foo/bar\n/foo/bar\n"|splitlines|commondir}\n' + foo + $ hg debugtemplate '{"/foo\n/foo\n"|splitlines|commondir}\n' + + $ hg debugtemplate '{"foo/bar\nbar/baz"|splitlines|commondir}\n' + + $ hg debugtemplate '{"foo/bar\nbar/baz\nbar/foo\n"|splitlines|commondir}\n' + + $ hg debugtemplate '{"foo/../bar\nfoo/bar"|splitlines|commondir}\n' + foo + $ hg debugtemplate '{"foo\n/foo"|splitlines|commondir}\n' + + + $ hg log -r null -T '{rev|commondir}' + hg: parse error: argument is not a list of text + (template filter 'commondir' is not compatible with keyword 'rev') + [255] + Add a dummy commit to make up for the instability of the above: $ echo a > a