teak-llvm/lldb/packages/Python/lldbsuite/test/terminal
Jordan Rupprecht 327a18ca0a [lldb][test] Prevent \n in calls to lldb's expect() test helper.
Summary:
expect() forwards its command to sendline(). This can be problematic if the command already contains a newline: sendline() unconditionally adds a newline to the command, which causes the command to run twice (hitting enter in lldb runs the previous command). The expect() helper looks for the prompt and finds the first one, but because the command has run a second time, the buffer will contain the contents of the second time the command ran, causing potential erroneous matching.

Simplify the editline test, which was using different commands to workaround this misunderstanding.

Reviewers: labath

Reviewed By: labath

Subscribers: merge_guards_bot, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D70324
2019-11-19 15:17:35 -08:00
..
TestEditline.py [lldb][test] Prevent \n in calls to lldb's expect() test helper. 2019-11-19 15:17:35 -08:00
TestSTTYBeforeAndAfter.py [dotest] Centralize initialization commands even more 2019-09-05 07:35:45 +00:00