diff options
Diffstat (limited to 'lldb/packages/Python/lldbsuite')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/functionalities/completion/TestCompletion.py | 7 | ||||
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/iohandler/completion/TestIOHandlerCompletion.py | 14 |
2 files changed, 21 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/completion/TestCompletion.py b/lldb/packages/Python/lldbsuite/test/functionalities/completion/TestCompletion.py index b95d490c887..0b5b3a416a0 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/completion/TestCompletion.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/completion/TestCompletion.py @@ -137,6 +137,13 @@ class CommandLineCompletionTestCase(TestBase): self.complete_from_to('log enable lldb expr -f ' + src_dir, ['main.cpp']) + @skipIfFreeBSD # timing out on the FreeBSD buildbot + def test_log_file(self): + # Complete in our source directory which contains a 'main.cpp' file. + src_dir = os.path.dirname(os.path.realpath(__file__)) + self.complete_from_to('log enable lldb expr -f ' + src_dir, + [src_dir + "/"]) + # <rdar://problem/11052829> @skipIfFreeBSD # timing out on the FreeBSD buildbot def test_infinite_loop_while_completing(self): 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)") |