Skip to content

Commit

Permalink
Fix many incorrect string escape sequences.
Browse files Browse the repository at this point in the history
  • Loading branch information
grafikrobot committed Dec 1, 2023
1 parent 8c329fc commit 9e3cf11
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 28 deletions.
10 changes: 5 additions & 5 deletions test/debugger.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def test_run():
run(t, """\
(b2db) run -ftest.jam
Starting program: {{bjam}} -ftest.jam
Child {{\d+}} exited with status 0
Child {{\\d+}} exited with status 0
(b2db) quit
""")

Expand All @@ -60,7 +60,7 @@ def test_exit_status():
(b2db) run -ftest.jam
Starting program: {{bjam}} -ftest.jam
Child {{\d+}} exited with status 1
Child {{\\d+}} exited with status 1
(b2db) quit
""")
t.cleanup()
Expand Down Expand Up @@ -384,7 +384,7 @@ def test_breakpoints():
Deleted breakpoint 3
(b2db) run -ftest.jam
Starting program: {{bjam}} -ftest.jam
Child {{\d+}} exited with status 0
Child {{\\d+}} exited with status 0
(b2db) quit
""")
t.cleanup()
Expand Down Expand Up @@ -473,7 +473,7 @@ def test_breakpoints_running():
(b2db) clear test.jam:12
Deleted breakpoint 4
(b2db) continue
Child {{\d+}} exited with status 0
Child {{\\d+}} exited with status 0
(b2db) quit
""")
t.cleanup()
Expand Down Expand Up @@ -553,7 +553,7 @@ def test_run_running():
Breakpoint 1, module scope at test.jam:1
1 UPDATE ;
(b2db) run -ftest.jam
Child {{\d+}} exited with status 0
Child {{\\d+}} exited with status 0
Starting program: {{bjam}} -ftest.jam
Breakpoint 1, module scope at test.jam:1
1 UPDATE ;
Expand Down
4 changes: 2 additions & 2 deletions test/feature_implicit_dependency.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,14 @@ class bbb-generator : generator
flags make-ccc AAAPATH : <aaa-path> ;
rule make-ccc ( target : sources * : properties * )
{
ECHO aaa path\: [ on $(target) return $(AAAPATH) ] ;
ECHO aaa path\\: [ on $(target) return $(AAAPATH) ] ;
common.copy $(target) : $(sources) ;
}
flags make-ddd BBBPATH : <bbb-path> ;
rule make-ddd ( target : sources * : properties * )
{
ECHO bbb path\: [ on $(target) return $(BBBPATH) ] ;
ECHO bbb path\\: [ on $(target) return $(BBBPATH) ] ;
common.copy $(target) : $(sources) ;
}
Expand Down
4 changes: 2 additions & 2 deletions test/generators_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,9 @@ def test_generated_target_names():
We use the following target generation structure with differently named
BBX targets:
/---> BB1 ---\
/---> BB1 ---\\
AAA --<----> BB2 ---->--> CCC --(composing)--> DDD
\---> BB3 ---/
\\---> BB3 ---/
The extra generator at the end is needed because generating a top-level
CCC target directly would requires us to explicitly specify a name for it.
Expand Down
28 changes: 14 additions & 14 deletions test/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,20 +529,20 @@ def write_subdir(dir):
t.write("outside/project/Jamroot", "run ../other/test.cpp ;")
t.run_build_system(["--dump-tests", "-n", "-d0"],
match=TestCmd.match_re, stdout=
"""boost-test\(RUN\) ".*/pass-run" : "pass-run\.cpp"
boost-test\(RUN_FAIL\) ".*/fail-run" : "fail-run\.cpp"
boost-test\(LINK\) ".*/pass-link" : "pass-link\.cpp"
boost-test\(LINK_FAIL\) ".*/fail-link" : "fail-link\.cpp"
boost-test\(COMPILE\) ".*/pass-compile" : "pass-compile\.cpp"
boost-test\(COMPILE_FAIL\) ".*/fail-compile" : "fail-compile\.cpp"
boost-test\(RUN\) "any/test" : "libs/any/test\.cpp"
boost-test\(RUN\) "any/test" : "libs/any/test/test\.cpp"
boost-test\(RUN\) "any/test" : "libs/any/example/test\.cpp"
boost-test\(RUN\) "bcp/test" : "tools/bcp/test/test\.cpp"
boost-test\(RUN\) "bcp/test" : "tools/bcp/example/test\.cpp"
boost-test\(RUN\) ".*/subdir/test/test" : "subdir/test/test\.cpp"
boost-test\(RUN\) "test" : "status/test\.cpp"
boost-test\(RUN\) ".*/outside/project/test" : "../other/test.cpp"
"""boost-test\\(RUN\\) ".*/pass-run" : "pass-run\\.cpp"
boost-test\\(RUN_FAIL\\) ".*/fail-run" : "fail-run\\.cpp"
boost-test\\(LINK\\) ".*/pass-link" : "pass-link\\.cpp"
boost-test\\(LINK_FAIL\\) ".*/fail-link" : "fail-link\\.cpp"
boost-test\\(COMPILE\\) ".*/pass-compile" : "pass-compile\\.cpp"
boost-test\\(COMPILE_FAIL\\) ".*/fail-compile" : "fail-compile\\.cpp"
boost-test\\(RUN\\) "any/test" : "libs/any/test\\.cpp"
boost-test\\(RUN\\) "any/test" : "libs/any/test/test\\.cpp"
boost-test\\(RUN\\) "any/test" : "libs/any/example/test\\.cpp"
boost-test\\(RUN\\) "bcp/test" : "tools/bcp/test/test\\.cpp"
boost-test\\(RUN\\) "bcp/test" : "tools/bcp/example/test\\.cpp"
boost-test\\(RUN\\) ".*/subdir/test/test" : "subdir/test/test\\.cpp"
boost-test\\(RUN\\) "test" : "status/test\\.cpp"
boost-test\\(RUN\\) ".*/outside/project/test" : "../other/test.cpp"
""")
t.cleanup()

Expand Down
8 changes: 4 additions & 4 deletions test/timedata.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ def basic_jam_action_test():
t.write("baz", "nothing")

expected_output = """\
\.\.\.found 4 targets\.\.\.
\.\.\.updating 2 targets\.\.\.
\\.\\.\\.found 4 targets\\.\\.\\.
\\.\\.\\.updating 2 targets\\.\\.\\.
make bar
time foo
bar +user: [0-9\.]+ +system: +[0-9\.]+ +clock: +[0-9\.]+ *
\.\.\.updated 2 targets\.\.\.$
bar +user: [0-9.]+ +system: +[0-9.]+ +clock: +[0-9.]+ *
\\.\\.\\.updated 2 targets\\.\\.\\.$
"""

t.run_build_system(["-ffile.jam", "-d+1"], stdout=expected_output,
Expand Down
2 changes: 1 addition & 1 deletion test/toolset-mock/src/MockProgram.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def allow_properties(*args):
# Use this in the stdout argument of command to print the command
# for running another script.
def script(name):
return os.path.join(os.path.dirname(__file__), "bin", re.sub('\.py$', '', name))
return os.path.join(os.path.dirname(__file__), "bin", re.sub('\\.py$', '', name))

def match(command_line):
for (p, stdout) in known_patterns:
Expand Down

0 comments on commit 9e3cf11

Please sign in to comment.