2 This tests some simple examples of parsing regex commands
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."""
17 "command regex one-substitution 's/(.+)/echo-cmd %1-first %1-second %1-third/'"
20 "one-substitution ASTRING",
21 substrs
=["ASTRING-first", "ASTRING-second", "ASTRING-third"],
25 "command regex two-substitution 's/([^ ]+) ([^ ]+)/echo-cmd %1-first %2-second %1-third %2-fourth/'"
28 "two-substitution ASTRING BSTRING",
38 # Call super's setUp().
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")