# HG changeset patch # User Yuya Nishihara # Date 2018-03-16 15:06:14 # Node ID ff9cb70673294bc210a07fd3f83cbcf01c585f56 # Parent e55d80804ace79f93efa8f049665a72a1dafcd85 test-template-engine: do not evaluate unused keywords by custom engine If the custom engine, "mytemplater", were installed as the default, it would enter to an infinite recursion at stringify(v) because template keywords may generate a nested mapping containing the same keywords. Spotted by a future patch which will replace context.resource('templ')(...) with context.process(...). diff --git a/tests/test-template-engine.t b/tests/test-template-engine.t --- a/tests/test-template-engine.t +++ b/tests/test-template-engine.t @@ -16,8 +16,7 @@ > props = self._defaults.copy() > props.update(map) > for k, v in props.items(): - > if k in (b'templ', b'ctx', b'repo', b'revcache', b'cache', - > b'troubles'): + > if b'{{%s}}' % k not in tmpl: > continue > if callable(v) and getattr(v, '_requires', None) is None: > props = self._resources.copy()