diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 16:04:21 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 16:04:21 +0000 |
commit | 8a754e0858d922e955e71b253c139e071ecec432 (patch) | |
tree | 527d16e74bfd1840c85efd675fdecad056c54107 /test/integration/targets/filter_urls/tasks/main.yml | |
parent | Initial commit. (diff) | |
download | ansible-core-upstream/2.14.3.tar.xz ansible-core-upstream/2.14.3.zip |
Adding upstream version 2.14.3.upstream/2.14.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | test/integration/targets/filter_urls/tasks/main.yml | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/integration/targets/filter_urls/tasks/main.yml b/test/integration/targets/filter_urls/tasks/main.yml new file mode 100644 index 0000000..c062326 --- /dev/null +++ b/test/integration/targets/filter_urls/tasks/main.yml @@ -0,0 +1,24 @@ +- name: Test urldecode filter + set_fact: + urldecoded_string: key="@{}é&%£ foo bar '(;\<>""°) + +- name: Test urlencode filter + set_fact: + urlencoded_string: 'key%3D%22%40%7B%7D%C3%A9%26%25%C2%A3%20foo%20bar%20%27%28%3B%5C%3C%3E%22%22%C2%B0%29' + +- name: Verify urlencode / urldecode isomorphism + assert: + that: + - urldecoded_string == urlencoded_string|urldecode + - urlencoded_string == urldecoded_string|urlencode + +- name: Verify urlencode handles dicts properly + assert: + that: + - "{'foo': 'bar'}|urlencode == 'foo=bar'" + - "{'foo': 'bar', 'baz': 'buz'}|urlencode == 'foo=bar&baz=buz'" + - "()|urlencode == ''" + +# Needed (temporarily) due to coverage reports not including the last task. +- assert: + that: true |