You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/integration/targets/unarchive/tasks/test_non_ascii_filename.yml

67 lines
2.2 KiB
YAML

- name: create our unarchive destination
file:
path: "{{ remote_tmp_dir }}/test-unarchive-nonascii-くらとみ-tar-gz"
state: directory
- name: test that unarchive works with an archive that contains non-ascii filenames
unarchive:
# Both the filename of the tarball and the filename inside the tarball have
# nonascii chars
src: "test-unarchive-nonascii-くらとみ.tar.gz"
dest: "{{ remote_tmp_dir }}/test-unarchive-nonascii-くらとみ-tar-gz"
mode: "u+rwX,go+rX"
remote_src: no
register: nonascii_result0
- name: Check that file is really there
stat:
path: "{{ remote_tmp_dir }}/test-unarchive-nonascii-くらとみ-tar-gz/storage/àâæçéèïîôœ(copy)!@#$%^&-().jpg"
register: nonascii_stat0
- name: Assert that nonascii tests succeeded
assert:
that:
- "nonascii_result0.changed == true"
- "nonascii_stat0.stat.exists == true"
- name: remove nonascii test
file:
path: "{{ remote_tmp_dir }}/test-unarchive-nonascii-くらとみ-tar-gz"
state: absent
- name: test non-ascii with different LC_ALL
block:
- name: create our unarchive destination
file:
path: "{{ remote_tmp_dir }}/test-unarchive-nonascii-くらとみ-tar-gz"
state: directory
- name: test that unarchive works with an archive that contains non-ascii filenames
unarchive:
# Both the filename of the tarball and the filename inside the tarball have
# nonascii chars
src: "test-unarchive-nonascii-くらとみ.tar.gz"
dest: "{{ remote_tmp_dir }}/test-unarchive-nonascii-くらとみ-tar-gz"
mode: "u+rwX,go+rX"
remote_src: no
register: nonascii_result0
- name: Check that file is really there
stat:
path: "{{ remote_tmp_dir }}/test-unarchive-nonascii-くらとみ-tar-gz/storage/àâæçéèïîôœ(copy)!@#$%^&-().jpg"
register: nonascii_stat0
- name: Assert that nonascii tests succeeded
assert:
that:
- "nonascii_result0.changed == true"
- "nonascii_stat0.stat.exists == true"
- name: remove nonascii test
file:
path: "{{ remote_tmp_dir }}/test-unarchive-nonascii-くらとみ-tar-gz"
state: absent
environment:
LC_ALL: C