mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Do not escape backslashes when processing a template file.
Fixes #12198 Fixes #12241
This commit is contained in:
@@ -22,7 +22,7 @@ __metaclass__ = type
|
||||
import jinja2
|
||||
from ansible.compat.tests import unittest
|
||||
|
||||
from ansible.template import _preserve_backslashes, _count_newlines_from_end
|
||||
from ansible.template import _escape_backslashes, _count_newlines_from_end
|
||||
|
||||
# These are internal utility functions only needed for templating. They're
|
||||
# algorithmic so good candidates for unittesting by themselves
|
||||
@@ -78,7 +78,7 @@ class TestBackslashEscape(unittest.TestCase):
|
||||
def test_backslash_escaping(self):
|
||||
|
||||
for test in self.test_data:
|
||||
intermediate = _preserve_backslashes(test['template'], self.env)
|
||||
intermediate = _escape_backslashes(test['template'], self.env)
|
||||
self.assertEquals(intermediate, test['intermediate'])
|
||||
template = jinja2.Template(intermediate)
|
||||
args = test['args']
|
||||
|
||||
Reference in New Issue
Block a user