From 682e728ebf00ac2859a3891c088f622e9f0f29dc Mon Sep 17 00:00:00 2001 From: Daniel Hokka Zakrisson Date: Sat, 16 Jun 2012 13:13:01 +0200 Subject: [PATCH] Add tests of iterative templating --- test/TestUtils.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/TestUtils.py b/test/TestUtils.py index 006a687e8b6..b83dcb0312d 100644 --- a/test/TestUtils.py +++ b/test/TestUtils.py @@ -236,6 +236,17 @@ class TestUtils(unittest.TestCase): assert res == u'hello wórld' + def test_template_varReplace_iterated(self): + template = 'hello $who' + vars = { + 'who': 'oh great $person', + 'person': 'one', + } + + res = ansible.utils.template(template, vars) + + assert res == u'hello oh great one' + ##################################### ### key-value parsing