Skip to content

Commit 660a571

Browse files
committed
python: fix regex backslash escapes
1 parent 540f241 commit 660a571

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/tools/miri/test-cargo-miri/run-test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ def cargo_miri(cmd, quiet = True):
3131

3232
def normalize_stdout(str):
3333
str = str.replace("src\\", "src/") # normalize paths across platforms
34-
str = re.sub("finished in \d+\.\d\ds", "finished in $TIME", str) # the time keeps changing, obviously
34+
str = re.sub("finished in \\d+\\.\\d\\ds", "finished in $TIME", str) # the time keeps changing, obviously
3535
return str
3636

3737
def normalize_stderr(str):
38-
str = re.sub("Preparing a sysroot for Miri \(target: [a-z0-9_-]+\)\.\.\. done\n", "", str) # remove leading cargo-miri setup output
38+
str = re.sub("Preparing a sysroot for Miri \\(target: [a-z0-9_-]+\\)\\.\\.\\. done\n", "", str) # remove leading cargo-miri setup output
3939
return str
4040

4141
def check_output(actual, path, name):

0 commit comments

Comments
 (0)