summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/iohandler/completion/TestIOHandlerCompletion.py
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/iohandler/completion/TestIOHandlerCompletion.py')
-rw-r--r--lldb/packages/Python/lldbsuite/test/iohandler/completion/TestIOHandlerCompletion.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/iohandler/completion/TestIOHandlerCompletion.py b/lldb/packages/Python/lldbsuite/test/iohandler/completion/TestIOHandlerCompletion.py
index 26805bfb07c..a6748c65619 100644
--- a/lldb/packages/Python/lldbsuite/test/iohandler/completion/TestIOHandlerCompletion.py
+++ b/lldb/packages/Python/lldbsuite/test/iohandler/completion/TestIOHandlerCompletion.py
@@ -2,6 +2,8 @@
Test completion in our IOHandlers.
"""
+import os
+
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
@@ -48,6 +50,18 @@ class IOHandlerCompletionTest(TestBase):
self.expect_string(prompt + "register")
self.child.send("\n")
+ # Try tab completing directories and files. Also tests the partial
+ # completion where LLDB shouldn't print a space after the directory
+ # completion (as it didn't completed the full token).
+ dir_without_slashes = os.path.realpath(os.path.dirname(__file__)).rstrip("/")
+ self.child.send("file " + dir_without_slashes + "\t")
+ self.expect_string("iohandler/completion/")
+ # If we get a correct partial completion without a trailing space, then this
+ # should complete the current test file.
+ self.child.send("TestIOHandler\t")
+ self.expect_string("TestIOHandlerCompletion.py")
+ self.child.send("\n")
+
# Start tab completion and abort showing more commands with 'n'.
self.child.send("\t")
self.expect_string("More (Y/n/a)")
OpenPOWER on IntegriCloud