1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fixes to parsing tests to remove trailing space

This commit is contained in:
James Cammarata 2014-07-23 22:54:39 -05:00
parent 1064550b47
commit 091b76efaa

View file

@ -34,14 +34,14 @@
- assert: - assert:
that: that:
result.cmd == 'echo "dog" ' result.cmd == 'echo "dog"'
- shell: echo 'dog' - shell: echo 'dog'
register: result register: result
- assert: - assert:
that: that:
result.cmd == 'echo \'dog\' ' result.cmd == 'echo \'dog\''
- name: a quoted argument is not sent to the shell module as anything but a string parameter - name: a quoted argument is not sent to the shell module as anything but a string parameter
shell: echo 'dog' 'executable=/usr/bin/python' shell: echo 'dog' 'executable=/usr/bin/python'
@ -51,7 +51,7 @@
- assert: - assert:
that: that:
result.cmd == "echo 'dog' 'executable=/usr/bin/python' " result.cmd == "echo 'dog' 'executable=/usr/bin/python'"
- name: it is valid to pass multiple key=value arguments because the shell doesn't check key=value arguments - name: it is valid to pass multiple key=value arguments because the shell doesn't check key=value arguments
shell: echo quackquack=here quackquack=everywhere shell: echo quackquack=here quackquack=everywhere
@ -59,7 +59,7 @@
- assert: - assert:
that: that:
result.cmd == 'echo quackquack=here quackquack=everywhere ' result.cmd == 'echo quackquack=here quackquack=everywhere'
- name: the same is true with quoting - name: the same is true with quoting
shell: echo "quackquack=here quackquack=everywhere" shell: echo "quackquack=here quackquack=everywhere"
@ -67,7 +67,7 @@
- assert: - assert:
that: that:
result.cmd == 'echo "quackquack=here quackquack=everywhere" ' result.cmd == 'echo "quackquack=here quackquack=everywhere"'
- name: the same is true with quoting (B) - name: the same is true with quoting (B)
shell: echo "quackquack=here" "quackquack=everywhere" shell: echo "quackquack=here" "quackquack=everywhere"
@ -87,7 +87,7 @@
- assert: - assert:
that: that:
result.cmd == "echo a=1 a=2 a=3 " result.cmd == "echo a=1 a=2 a=3"
- name: more shell duplicates - name: more shell duplicates
shell: echo foo=bar foo=bar shell: echo foo=bar foo=bar
@ -95,7 +95,7 @@
- assert: - assert:
that: that:
result.cmd == "echo foo=bar foo=bar " result.cmd == "echo foo=bar foo=bar"
- name: multi-line inline shell commands (should use script module but hey) are a thing - name: multi-line inline shell commands (should use script module but hey) are a thing
shell: "{{ multi_line }}" shell: "{{ multi_line }}"
@ -115,4 +115,4 @@
- assert: - assert:
that: that:
# command shouldn't end in spaces, amend test once fixed # command shouldn't end in spaces, amend test once fixed
- result.cmd == "echo foo --arg=a --arg=b " - result.cmd == "echo foo --arg=a --arg=b"