summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDaniel Hokka Zakrisson <daniel@hozac.com>2012-06-16 13:13:01 +0200
committerDaniel Hokka Zakrisson <daniel@hozac.com>2012-06-16 13:13:01 +0200
commit24d73b0fe6fdc4503fd7ef2a00db9894065d6a9c (patch)
tree03fbcaf6f678d256e26162e68ec7384641c49d96 /test
parent13b814a33c6ff35a5e22c8887a1e08196bb3fc66 (diff)
downloadansible-24d73b0fe6fdc4503fd7ef2a00db9894065d6a9c.tar.gz
Add tests of iterative templating
Diffstat (limited to 'test')
-rw-r--r--test/TestUtils.py11
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