From 8c49fd2a2c9d6996d4520641d7f9bad555a32627 Mon Sep 17 00:00:00 2001 From: Sam Doran Date: Mon, 5 Nov 2018 17:03:41 -0500 Subject: [PATCH] Adjust pause test (#48125) Use send() rather than sendlin() calls when testing interactive prompting and echo. --- test/integration/targets/pause/test-pause.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/test/integration/targets/pause/test-pause.py b/test/integration/targets/pause/test-pause.py index 20afef98b1e..7b37c666464 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()