labath added a comment.

Some quibbles about the test. Otherwise, this looks good to me.



================
Comment at: lldb/test/API/iohandler/autosuggestion/TestAutosuggestion.py:33
+        self.child.send("hel")
+        self.child.expect_exact(faint_color + "p frame" + reset + "\x1b[1G")
+        
----------------
`[1G` means move the cursor to the first column, which is not what we have 
wanted to test here. My guess is that this `1G` is the start of the sequence 
that libedit uses to redraw the prompt (or the entire command line). If that's 
the case (and we are serious about testing the cursor position), then I guess 
you'll need to expect that entire sequence. Or possibly, split this into two 
`expect_exact` calls so that the second call just checks for the presence of 
the final sequence which actually puts the cursor in the right place.


================
Comment at: lldb/test/API/iohandler/autosuggestion/TestAutosuggestion.py:52
+        self.child.send(ctrl_f)
+        self.child.expect_exact("")
+        self.child.send("\n")
----------------
This won't check anything because an empty string is "everywhere". I thing the 
best we can do right now is  type some more text after the ^F, and then check 
that _that_ text is executed properly (i.e., that it didn't get appended to 
some other command).


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D81001/new/

https://reviews.llvm.org/D81001



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to