diff options
author | Daniel Hokka Zakrisson <daniel@hozac.com> | 2012-06-16 13:13:01 +0200 |
---|---|---|
committer | Daniel Hokka Zakrisson <daniel@hozac.com> | 2012-06-16 13:13:01 +0200 |
commit | 24d73b0fe6fdc4503fd7ef2a00db9894065d6a9c (patch) | |
tree | 03fbcaf6f678d256e26162e68ec7384641c49d96 /test | |
parent | 13b814a33c6ff35a5e22c8887a1e08196bb3fc66 (diff) | |
download | ansible-24d73b0fe6fdc4503fd7ef2a00db9894065d6a9c.tar.gz |
Add tests of iterative templating
Diffstat (limited to 'test')
-rw-r--r-- | test/TestUtils.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/TestUtils.py b/test/TestUtils.py index 006a687e8b..b83dcb0312 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 |