mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-08 09:24:01 -07:00
Fix the basic templating system such that when the template ends in '$', life continues as normal.
This commit is contained in:
parent
6b8448051f
commit
6fa1a49037
4 changed files with 11 additions and 7 deletions
|
@ -19,6 +19,12 @@ class TestUtils(unittest.TestCase):
|
|||
|
||||
assert res == 'hello world'
|
||||
|
||||
def test_varReplace_trailing_dollar(self):
|
||||
template = '$what $who $'
|
||||
vars = dict(what='hello', who='world')
|
||||
res = ansible.utils.varReplace(template, vars)
|
||||
assert res == 'hello world $'
|
||||
|
||||
def test_varReplace_multiple(self):
|
||||
template = '$what $who'
|
||||
vars = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue