FileCheck the ansi escape codes seems like one possibility. In general I think you don't actually need to test true interactivity, because the odds of there being a problem in the 2-3 lines of code that convert the keyboard press to something else in LLDB are very unlikely to be problematic, and the rest can be mocked.
On Thu, Jan 31, 2019 at 10:42 AM Pavel Labath <pa...@labath.sk> wrote: > On 31/01/2019 19:26, Zachary Turner wrote: > > Was the test failing specifically in the keyboard handler for up arrow, > > or was it failing in the command history searching code? Because if > > it's the latter, then we could have a command which searches the command > > history. > > > > The patch is r351313, if you want to look at it in detail. But, I don't > think this one example matters too much, since we will always have some > code which deals with the interactivity of the terminal. That will need > to be tested somehow. > > Another example: we have a fairly complex piece of code that makes sure > our (lldb) prompt comes out in color. How do we write a test for that? >
_______________________________________________ lldb-dev mailing list firstname.lastname@example.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev