Test escaping strings with two variables

release1.7.1
Marcus Cobden 10 years ago committed by James Cammarata
parent 08c968a999
commit 6f8498d0b1

@ -729,6 +729,10 @@ class TestUtils(unittest.TestCase):
ansible.utils._clean_data('this string has a {{variable}}', from_remote=True), ansible.utils._clean_data('this string has a {{variable}}', from_remote=True),
'this string has a {#variable#}' '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( self.assertEqual(
ansible.utils._clean_data('this string has a {{variable with a\nnewline}}', from_remote=True), ansible.utils._clean_data('this string has a {{variable with a\nnewline}}', from_remote=True),
'this string has a {#variable with a\nnewline#}' 'this string has a {#variable with a\nnewline#}'

Loading…
Cancel
Save