Mercurial > public > mercurial-scm > hg
diff tests/test-command-template.t @ 37404:7c902a8345ef
templater: complain about invalid application of '%' operator (BC)
Before, '{x % y % z ...}' was silently evaluated as '{x % y}'. We no longer
need this hack since the web template bugs was fixed by earlier patches.
At this point, the error message may contain '<generator *>', which will
be fixed later.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 18 Mar 2018 21:01:23 +0900 |
parents | 05db42732fce |
children | afd7b0afe4a6 |
line wrap: on
line diff
--- a/tests/test-command-template.t Sun Mar 18 21:18:57 2018 +0900 +++ b/tests/test-command-template.t Sun Mar 18 21:01:23 2018 +0900 @@ -3210,10 +3210,13 @@ $ hg log -R latesttag -r tip -T '{rev % "a"}\n' - hg: parse error: keyword 'rev' is not iterable + hg: parse error: keyword 'rev' is not iterable of mappings [255] $ hg log -R latesttag -r tip -T '{get(extras, "unknown") % "a"}\n' - hg: parse error: None is not iterable + hg: parse error: None is not iterable of mappings + [255] + $ hg log -R latesttag -r tip -T '{extras % "{key}\n" % "{key}\n"}' + hg: parse error: <generator *> is not iterable of mappings (glob) [255] Test new-style inline templating of non-list/dict type: @@ -3228,7 +3231,7 @@ $ hg log -R latesttag -r tip -T '{get(extras, "branch") % "{key}: {value}\n"}' branch: default $ hg log -R latesttag -r tip -T '{get(extras, "unknown") % "{key}\n"}' - hg: parse error: None is not iterable + hg: parse error: None is not iterable of mappings [255] $ hg log -R latesttag -r tip -T '{min(extras) % "{key}: {value}\n"}' branch: default