Skip to content

Commit

Permalink
Merge pull request ansible#10868 from jaypei/devel
Browse files Browse the repository at this point in the history
Add lineinfile integration tests for quoted string
  • Loading branch information
bcoca committed May 4, 2015
2 parents 8cf4452 + 288fe11 commit 4d357a7
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/integration/roles/test_lineinfile/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -355,4 +355,22 @@
that:
- "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'"

###################################################################

0 comments on commit 4d357a7

Please sign in to comment.