1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-06-29 23:49:09 +00:00

Merge branch 'varfind-cleanups' of git://github.com/dhozac/ansible into devel

This commit is contained in:
Michael DeHaan 2012-10-25 20:14:20 -04:00
commit f8e946b71d
2 changed files with 47 additions and 37 deletions

View file

@ -230,6 +230,14 @@ class TestUtils(unittest.TestCase):
res = ansible.utils.varReplace(template, vars, expand_lists=True)
assert res == 'yum pkg=foo,bar,baz state=installed'
def test_varReplace_escaped_var(self):
vars = {
'foo': 'bar',
}
template = 'action \$foo'
res = ansible.utils.varReplace(template, vars)
assert res == 'action $foo'
def test_template_varReplace_iterated(self):
template = 'hello $who'
vars = {