diff tests/test-command-template.t @ 28331:2874db5462d3

templater: fix get() to evaluate arguments eagerly If a key is constructed from a template expression, it may be a generator. In that case, a key have to be stringified. A dictarg should never be a generator, but this patch also changes it to call evalfuncarg() for consistency.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 14 Feb 2016 00:05:58 +0900
parents 650c9f69a744
children e91371633127
line wrap: on
line diff
--- a/tests/test-command-template.t	Wed Mar 02 15:38:54 2016 +0000
+++ b/tests/test-command-template.t	Sun Feb 14 00:05:58 2016 +0900
@@ -3176,6 +3176,8 @@
 
   $ hg log -r 0 --template '{get(extras, "branch")}\n'
   default
+  $ hg log -r 0 --template '{get(extras, "br{"anch"}")}\n'
+  default
   $ hg log -r 0 --template '{get(files, "should_fail")}\n'
   hg: parse error: get() expects a dict as first argument
   [255]