mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #10868 from jaypei/devel
Add lineinfile integration tests for quoted string
This commit is contained in:
commit
4d357a73f6
1 changed files with 18 additions and 0 deletions
|
@ -355,4 +355,22 @@
|
||||||
that:
|
that:
|
||||||
- "result.stat.checksum == '73b271c2cc1cef5663713bc0f00444b4bf9f4543'"
|
- "result.stat.checksum == '73b271c2cc1cef5663713bc0f00444b4bf9f4543'"
|
||||||
|
|
||||||
|
- name: insert a line into the quoted file with many double quotation strings
|
||||||
|
lineinfile: dest={{output_dir}}/test_quoting.txt line="\"quote\" and \"unquote\""
|
||||||
|
register: result
|
||||||
|
|
||||||
|
- name: assert that the quoted file was changed
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
|
- result.changed
|
||||||
|
|
||||||
|
- name: stat the quote test file
|
||||||
|
stat: path={{output_dir}}/test_quoting.txt
|
||||||
|
register: result
|
||||||
|
|
||||||
|
- name: assert test checksum matches after backref line was replaced
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
|
- "result.stat.checksum == 'b10ab2a3c3b6492680c8d0b1d6f35aa6b8f9e731'"
|
||||||
|
|
||||||
###################################################################
|
###################################################################
|
||||||
|
|
Loading…
Reference in a new issue