rupprecht marked an inline comment as done. rupprecht added inline comments.
================ Comment at: lldb/packages/Python/lldbsuite/test/terminal/TestEditline.py:37-38 + + # Run help for different commands for escape variants to make sure each + # one matches uniquely (the buffer isn't cleared in between matches). + cases = [ ---------------- labath wrote: > The buffer isn't exactly "cleared", but each "expect" command should only > match from the end of the previous match, so repeating the same command > should not be a problem. What the other (few) pexpect tests do is put an > `self.expect_prompt()` to ensure all output from the previous command is > ignored, and lldb is ready to receive a new command. You could do that too. > In fact, you could probably use the helper "expect" command which does all of > this for you: > `self.expect("el ommand{L}c{L}{L}h{R}p".format(...), substrs=["Syntax: > command"])` The expect helper is nice, thanks! > but each "expect" command should only match from the end of the previous match I am not able to reproduce that. If I change the expect to the static string `"Syntax: print"` (not `% cmd`), then the second case (which types `"help step"`) passes. Which implies it's checking the entire buffer. The third case (`"help exit"`) fails because the buffer does not contain the `print` help text anymore. But that means this behavior is dependent on the relation between help text length and buffer size. For now, I'll leave this as separate help commands. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70137/new/ https://reviews.llvm.org/D70137 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits