blob: c062326c54e9d4638654939d28af09cab23d764c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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
|