diff options
author | Julien Champseix <birdypme@users.noreply.github.com> | 2018-07-25 22:10:40 +0200 |
---|---|---|
committer | Toshio Kuratomi <a.badger@gmail.com> | 2018-07-25 13:10:40 -0700 |
commit | 19dc267e4cae675831015b2c224d7d961398cc58 (patch) | |
tree | 9127a3c00bb3bda82ffa065393164141a03917bb /test/sanity/code-smell/no-smart-quotes.py | |
parent | 5b4a7cc283422525001b3b9e1d86d8fb29d3aec4 (diff) | |
download | ansible-19dc267e4cae675831015b2c224d7d961398cc58.tar.gz |
Allow specifying the output encoding in the template module (#42171)
Allow specifying the source and destination files' encodings in the template module
* Added output_encoding to the template module, default to utf-8
* Added documentation for the new variables
* Leveraged the encoding argument on to_text() and to_bytes() to keep the implementation as simple as possible
* Added integration tests with files in utf-8 and windows-1252 encodings, testing all combinations
* fix bad smell test by excluding windows-1252 files from the utf8 checks
* fix bad smell test by excluding valid files from the smart quote test
Diffstat (limited to 'test/sanity/code-smell/no-smart-quotes.py')
-rwxr-xr-x | test/sanity/code-smell/no-smart-quotes.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/sanity/code-smell/no-smart-quotes.py b/test/sanity/code-smell/no-smart-quotes.py index 9c0e0a5091..672fb35f96 100755 --- a/test/sanity/code-smell/no-smart-quotes.py +++ b/test/sanity/code-smell/no-smart-quotes.py @@ -12,6 +12,9 @@ def main(): 'docs/docsite/rst/dev_guide/testing/sanity/no-smart-quotes.rst', 'test/integration/targets/unicode/unicode.yml', 'test/integration/targets/lookup_properties/lookup-8859-15.ini', + 'test/integration/targets/template/files/encoding_1252_utf-8.expected', + 'test/integration/targets/template/files/encoding_1252_windows-1252.expected', + 'test/integration/targets/template/templates/encoding_1252.j2', ]) for path in sys.argv[1:] or sys.stdin.read().splitlines(): |