diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-26 04:06:02 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-26 04:06:02 +0000 |
commit | e3eb94c23206603103f3c4faec6c227f59a1544c (patch) | |
tree | f2639459807ba88f55fc9c54d745bd7075d7f15c /ansible_collections/community/dns/tests/integration | |
parent | Releasing progress-linux version 9.4.0+dfsg-1~progress7.99u1. (diff) | |
download | ansible-e3eb94c23206603103f3c4faec6c227f59a1544c.tar.xz ansible-e3eb94c23206603103f3c4faec6c227f59a1544c.zip |
Merging upstream version 9.5.1+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ansible_collections/community/dns/tests/integration')
-rw-r--r-- | ansible_collections/community/dns/tests/integration/targets/filter_txt/aliases | 6 | ||||
-rw-r--r-- | ansible_collections/community/dns/tests/integration/targets/filter_txt/tasks/main.yml | 49 |
2 files changed, 55 insertions, 0 deletions
diff --git a/ansible_collections/community/dns/tests/integration/targets/filter_txt/aliases b/ansible_collections/community/dns/tests/integration/targets/filter_txt/aliases new file mode 100644 index 000000000..b7419a24d --- /dev/null +++ b/ansible_collections/community/dns/tests/integration/targets/filter_txt/aliases @@ -0,0 +1,6 @@ +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +shippable/posix/group1 +skip/python2.6 # filters are controller only, and we no longer support Python 2.6 on the controller diff --git a/ansible_collections/community/dns/tests/integration/targets/filter_txt/tasks/main.yml b/ansible_collections/community/dns/tests/integration/targets/filter_txt/tasks/main.yml new file mode 100644 index 000000000..c0afffcea --- /dev/null +++ b/ansible_collections/community/dns/tests/integration/targets/filter_txt/tasks/main.yml @@ -0,0 +1,49 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +- name: "Test quote_txt filter" + assert: + that: + - >- + '' | community.dns.quote_txt == '""' + - >- + "this is a test" | community.dns.quote_txt == '"this is a test"' + - >- + "test" | community.dns.quote_txt == 'test' + - >- + "test" | community.dns.quote_txt(always_quote=true) == '"test"' + - >- + '"' | community.dns.quote_txt == '\\"' + - >- + ' ' | community.dns.quote_txt == '" "' + - >- + "ä" | community.dns.quote_txt() == '\\195\\164' + - >- + "ä" | community.dns.quote_txt(character_encoding='octal') == '\\303\\244' + - >- + "ä" | community.dns.quote_txt(character_encoding='octal', always_quote=true) == '"\\303\\244"' + - >- + very_long_input | community.dns.quote_txt == very_long_output + vars: + very_long_input: >- + this is a very1, very2, very3, very4, very5, very6, very7, very8, very9, very10, very11, very12, very13, very14, very15, + very16, very17, very18, very19, very20, very21, very22, very23, very24, very25, very26, very27, very28, very29, very30, + very31, very32, very33, very34, very35, very36, very37, very38, very39 long text + very_long_output: >- + "this is a very1, very2, very3, very4, very5, very6, very7, very8, very9, very10, very11, very12, very13, very14, very15, + very16, very17, very18, very19, very20, very21, very22, very23, very24, very25, very26, very27, very28, very29, very30, + very31, very32" ", very33, very34, very35, very36, very37, very38, very39 long text" + +- name: "Test unquote_txt filter" + assert: + that: + - >- + '' | community.dns.unquote_txt == '' + - >- + '""' | community.dns.unquote_txt == '' + - > + '"foo" "bar"' | community.dns.unquote_txt == "foobar" + - > + 'foo "bar baz" bam' | community.dns.unquote_txt == "foobar bazbam" |