Commit graph

14 commits

Author SHA1 Message Date
Brian Coca
b6d6c2e4db corrected all missing paths changes 2015-09-15 11:57:54 -04:00
Marius Gedminas
f91b28ef23 Fix safe_eval() of set literals
There was code to support set literals (on Python 2.7 and newer), but it
was buggy: SAFE_NODES.union() doesn't modify SAFE_NODES in place,
instead it returns a new set object that is then silently discarded.

I added a unit test and fixed the code.  I also changed the version
check to use sys.version_tuple instead of a string comparison, for
consistency with the subsequent Python 3.4 version check that I added in
the previous commit.
2015-09-11 09:41:05 +03:00
Toshio Kuratomi
e218bf8da9 Do not escape backslashes when processing a template file.
Fixes #12198
Fixes #12241
2015-09-03 17:45:17 -07:00
Toshio Kuratomi
1b64702b9a Fix templar unittests for change in preserve_trailing_newline parameter's default value 2015-09-02 11:58:01 -07:00
James Cammarata
45aac6a739 Adding unit tests for safe_eval 2015-09-02 14:12:06 -04:00
Toshio Kuratomi
9ecfc30f9a * Mark all strings as unicode -- shouldn't matter for this dataset but
ansible is passing unicode arond internally so we should test the same
  data.
* Add a zero length test for _count_newlines and fix the zero newlines
  test to have no newlines.
2015-09-02 09:43:42 -07:00
Toshio Kuratomi
417bf1c805 Unittest the _count_trailing_newlines function 2015-09-02 08:59:31 -07:00
Toshio Kuratomi
7f5080f64a Fix backslash escaping inside of jinja2 expressions
Fixes #11891
2015-08-31 13:17:26 -07:00
Brian Coca
43bf9c86d8 fixed typo 2015-08-16 13:15:23 -04:00
Brian Coca
d38bb4152d fixed test to match new exception class used 2015-08-16 10:35:09 -04:00
Brian Coca
e9cf67004b updated fail_on_undefined test to new function signatures 2015-06-11 13:45:04 -04:00
James Cammarata
398b1d3e60 Cleaning up template test syntax a bit 2015-05-17 01:13:22 -05:00
James Cammarata
9aa8676bdd More template unit tests for v2 2015-05-17 01:06:02 -05:00
James Cammarata
23cd3294d0 Starting to add v2 tests for template 2015-05-16 15:45:01 -05:00