diff options
author | Sam Doran <sdoran@redhat.com> | 2018-11-05 17:03:41 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-05 17:03:41 -0500 |
commit | 8c49fd2a2c9d6996d4520641d7f9bad555a32627 (patch) | |
tree | 076353bfbf2af8c2d27abe842abb068ce7eac19a /test/integration/targets/pause | |
parent | 066af3b6ca30f4bb7341bf015fc4bc980bb036ab (diff) | |
download | ansible-8c49fd2a2c9d6996d4520641d7f9bad555a32627.tar.gz |
Adjust pause test (#48125)
Use send() rather than sendlin() calls when testing interactive prompting and echo.
Diffstat (limited to 'test/integration/targets/pause')
-rwxr-xr-x | test/integration/targets/pause/test-pause.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/test/integration/targets/pause/test-pause.py b/test/integration/targets/pause/test-pause.py index 20afef98b1..7b37c66646 100755 --- a/test/integration/targets/pause/test-pause.py +++ b/test/integration/targets/pause/test-pause.py @@ -246,7 +246,7 @@ pause_test.expect('user requested abort!') pause_test.expect(pexpect.EOF) pause_test.close() -# -- Enter input and ensure it's caputered, echoed, and can be edited -- # +# -- Enter input and ensure it's captured, echoed, and can be edited -- # playbook = 'pause-5.yml' @@ -259,12 +259,15 @@ pause_test = pexpect.spawn( pause_test.logfile = log_buffer pause_test.expect(r'Enter some text:') -pause_test.sendline('hello there') +pause_test.send('hello there') +pause_test.send('\r') pause_test.expect(r'Enter some text to edit:') pause_test.send('hello there') pause_test.send(backspace * 4) -pause_test.send('ommy boy\r') +pause_test.send('ommy boy') +pause_test.send('\r') pause_test.expect(r'Enter some text \(output is hidden\):') -pause_test.sendline('supersecretpancakes') +pause_test.send('supersecretpancakes') +pause_test.send('\r') pause_test.expect(pexpect.EOF) pause_test.close() |