summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/functionalities/command_regex
diff options
context:
space:
mode:
authorDavide Italiano <davide@freebsd.org>2019-02-06 21:48:01 +0000
committerDavide Italiano <davide@freebsd.org>2019-02-06 21:48:01 +0000
commit6c27a06302c234871b137d80c3c157f251333695 (patch)
treed3685b69dafce16bcb58b36344a5e436096c4d9c /lldb/packages/Python/lldbsuite/test/functionalities/command_regex
parent42f58498c563ba5c936dbe456799148d33a9ac5e (diff)
downloadbcm5719-llvm-6c27a06302c234871b137d80c3c157f251333695.tar.gz
bcm5719-llvm-6c27a06302c234871b137d80c3c157f251333695.zip
[testsuite] Convert a pexpect test to lit.
Summary: Reviewers: JDevlieghere, friss, zturner, labath, jingham, serge-sans-paille Subscribers: llvm-commits, lldb-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D57840 llvm-svn: 353345
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/functionalities/command_regex')
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/command_regex/.categories1
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/command_regex/TestCommandRegex.py63
2 files changed, 0 insertions, 64 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/command_regex/.categories b/lldb/packages/Python/lldbsuite/test/functionalities/command_regex/.categories
deleted file mode 100644
index 3a3f4df6416..00000000000
--- a/lldb/packages/Python/lldbsuite/test/functionalities/command_regex/.categories
+++ /dev/null
@@ -1 +0,0 @@
-cmdline
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/command_regex/TestCommandRegex.py b/lldb/packages/Python/lldbsuite/test/functionalities/command_regex/TestCommandRegex.py
deleted file mode 100644
index e1c5b4b4825..00000000000
--- a/lldb/packages/Python/lldbsuite/test/functionalities/command_regex/TestCommandRegex.py
+++ /dev/null
@@ -1,63 +0,0 @@
-"""
-Test lldb 'commands regex' command which allows the user to create a regular expression command.
-"""
-
-from __future__ import print_function
-
-
-import os
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class CommandRegexTestCase(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
-
- @expectedFailureAll(
- hostoslist=["windows"],
- bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
- @no_debug_info_test
- def test_command_regex(self):
- """Test a simple scenario of 'command regex' invocation and subsequent use."""
- import pexpect
- prompt = "(lldb) "
- regex_prompt = "Enter one of more sed substitution commands in the form: 's/<regex>/<subst>/'.\r\nTerminate the substitution list with an empty line.\r\n"
- regex_prompt1 = "\r\n"
-
- child = pexpect.spawn('%s %s' %
- (lldbtest_config.lldbExec, self.lldbOption))
- # Turn on logging for what the child sends back.
- if self.TraceOn():
- child.logfile_read = sys.stdout
- # So that the spawned lldb session gets shutdown durng teardown.
- self.child = child
-
- # Substitute 'Help!' for 'help' using the 'commands regex' mechanism.
- child.expect_exact(prompt)
- child.sendline("command regex 'Help__'")
- child.expect_exact(regex_prompt)
- child.sendline('s/^$/help/')
- child.expect_exact(regex_prompt1)
- child.sendline('')
- child.expect_exact(prompt)
- # Help!
- child.sendline('Help__')
- # If we see the familiar 'help' output, the test is done.
- child.expect('Debugger commands:')
- # Try and incorrectly remove "Help__" using "command unalias" and
- # verify we fail
- child.sendline('command unalias Help__')
- child.expect_exact(
- "error: 'Help__' is not an alias, it is a debugger command which can be removed using the 'command delete' command")
- child.expect_exact(prompt)
-
- # Delete the regex command using "command delete"
- child.sendline('command delete Help__')
- child.expect_exact(prompt)
- # Verify the command was removed
- child.sendline('Help__')
- child.expect_exact("error: 'Help__' is not a valid command")
- child.expect_exact(prompt)
OpenPOWER on IntegriCloud