mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Add tests of iterative templating
This commit is contained in:
parent
13b814a33c
commit
24d73b0fe6
1 changed files with 11 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue