[clang] Fix implicit integer conversion for opaque enums declared in class templates...
[llvm-project.git] / lldb / test / API / commands / command / regex / TestRegexCommand.py
blob663d503f6bd344fe28356acc7f16c73b5a9814d0
1 """
2 This tests some simple examples of parsing regex commands
3 """
5 import os
6 import lldb
7 import lldbsuite.test.lldbutil as lldbutil
8 from lldbsuite.test.lldbtest import *
11 class TestCommandRegexParsing(TestBase):
12 NO_DEBUG_INFO_TESTCASE = True
14 def test_sample_rename_this(self):
15 """Try out some simple regex commands, make sure they parse correctly."""
16 self.runCmd(
17 "command regex one-substitution 's/(.+)/echo-cmd %1-first %1-second %1-third/'"
19 self.expect(
20 "one-substitution ASTRING",
21 substrs=["ASTRING-first", "ASTRING-second", "ASTRING-third"],
24 self.runCmd(
25 "command regex two-substitution 's/([^ ]+) ([^ ]+)/echo-cmd %1-first %2-second %1-third %2-fourth/'"
27 self.expect(
28 "two-substitution ASTRING BSTRING",
29 substrs=[
30 "ASTRING-first",
31 "BSTRING-second",
32 "ASTRING-third",
33 "BSTRING-fourth",
37 def setUp(self):
38 # Call super's setUp().
39 TestBase.setUp(self)
40 self.runCmd(
41 "command script import "
42 + os.path.join(self.getSourceDir(), "echo_command.py")
44 self.runCmd("command script add echo-cmd -f echo_command.echo_command")