Test escaping strings with two variables

This commit is contained in:
Marcus Cobden 2014-08-11 08:46:47 +01:00
parent 84114e5c0b
commit e3dbca9378

View file

@ -729,6 +729,10 @@ class TestUtils(unittest.TestCase):
ansible.utils._clean_data('this string has a {{variable}}', from_remote=True),
'this string has a {#variable#}'
)
self.assertEqual(
ansible.utils._clean_data('this string {{has}} two {{variables}} in it', from_remote=True),
'this string {#has#} two {#variables#} in it'
)
self.assertEqual(
ansible.utils._clean_data('this string has a {{variable with a\nnewline}}', from_remote=True),
'this string has a {#variable with a\nnewline#}'