diff tests/test-command-template.t @ 20066:64b4f0cd7336 stable

templater: fix escaping in nested string literals (issue4102) Before the templater got extended for nested expressions, it made sense to decode string escapes across the whole string. Now we do it on a piece by piece basis.
author Matt Mackall <mpm@selenic.com>
date Mon, 18 Nov 2013 14:02:26 -0500
parents 0361163efbaf
children 3d8bfe2ecf6d
line wrap: on
line diff
--- a/tests/test-command-template.t	Thu Nov 07 20:36:26 2013 -0800
+++ b/tests/test-command-template.t	Mon Nov 18 14:02:26 2013 -0500
@@ -1586,3 +1586,11 @@
   h1c
   b
   a
+
+Test string escaping:
+
+  $ hg log -R latesttag -r 0 --template '>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n'
+  >
+  <>\n<[>
+  <>\n<]>
+  <>\n<