From deb6e40f0ffa92140e0ac016407c9a53e1b7c1ea Mon Sep 17 00:00:00 2001 From: William Deegan Date: Tue, 14 Jul 2020 12:37:27 -0700 Subject: swap / to \ for win32 and regex escape that --- test/TempFileMunge/TEMPFILEDIR.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/TempFileMunge/TEMPFILEDIR.py b/test/TempFileMunge/TEMPFILEDIR.py index ced2fe9..b528be3 100644 --- a/test/TempFileMunge/TEMPFILEDIR.py +++ b/test/TempFileMunge/TEMPFILEDIR.py @@ -27,6 +27,7 @@ And if not specified in one of TMPDIR, TEMP or TMP (based on os' normal usage of from re import escape import tempfile import TestSCons +from TestCmd import IS_WINDOWS test = TestSCons.TestSCons(match=TestSCons.match_re) @@ -40,6 +41,8 @@ xxx.py global_foo.out foo.in xxx.py @__TEMPDIR__/\S+ """ +if IS_WINDOWS: + expected_output = expected_output.replace('/','\\\\') wd_escaped = escape(test.workdir) td_escaped = escape(tempfile.gettempdir()) expected_output =expected_output.replace("__WORKDIR__", wd_escaped) -- cgit v0.12