================
@@ -0,0 +1,46 @@
+import lldb
+import re
+
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test.lldbpexpect import PExpectTest
+
+
+class TestStatusline(PExpectTest):
+ def do_setup(self):
+ # Create a target and run to a breakpoint.
+ exe = self.getBuildArtifact("a.out")
+ self.expect(
+ "target create {}".format(exe), substrs=["Current executable set
to"]
+ )
+ self.expect('breakpoint set -p "Break here"', substrs=["Breakpoint 1"])
+ self.expect("run", substrs=["stop reason"])
+
+ # PExpect uses many timeouts internally and doesn't play well
+ # under ASAN on a loaded machine..
+ @skipIfAsan
+ def test(self):
+ """Basic test for the statusline.
+
+ PExpect was designed for line-oriented output so we're limited in what
+ we can test.
+ """
+ self.build()
+ self.launch(timeout=3)
+ self.do_setup()
+
+ # Change the terminal dimensions.
+ self.child.setwinsize(10, 60)
+
+ # Enable the statusline and check that we can see the target, the
+ # location and the stop reason.
+ self.child.send("set set show-statusline true\n")
+ self.child.expect(
+ re.escape("a.out | main.c:4:15 | breakpoint 1.1
")
+ )
+
+ # Change the terminal dimensions.
+ self.child.setwinsize(10, 20)
+ self.child.send("set set show-statusline false\n")
+ self.child.send("set set show-statusline true\n")
----------------
labath wrote:
And the same here.
https://github.com/llvm/llvm-project/pull/121860
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits