Mercurial > public > mercurial-scm > hg
diff tests/test-command-template.t @ 20072:6d4fda48b4e3
merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 19 Nov 2013 11:29:56 -0500 |
parents | e54a078153f7 3d8bfe2ecf6d |
children | 986d09e696ff |
line wrap: on
line diff
--- a/tests/test-command-template.t Sun Nov 17 20:22:59 2013 -0500 +++ b/tests/test-command-template.t Tue Nov 19 11:29:56 2013 -0500 @@ -1601,3 +1601,23 @@ date: 70 01 01 02 +0000 date: 70 01 01 01 +0000 date: 70 01 01 00 +0000 + +Test string escaping: + + $ hg log -R latesttag -r 0 --template '>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n' + > + <>\n<[> + <>\n<]> + <>\n< + +Test recursive evaluation: + + $ hg init r + $ cd r + $ echo a > a + $ hg ci -Am '{rev}' + adding a + $ hg log -r 0 --template '{if(rev, desc)}\n' + {rev} + $ hg log -r 0 --template '{if(rev, "{author} {rev}")}\n' + test 0