diff options
author | William Deegan <bill@baddogconsulting.com> | 2020-07-14 12:37:27 -0700 |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2020-07-14 12:37:27 -0700 |
commit | deb6e40f0ffa92140e0ac016407c9a53e1b7c1ea (patch) | |
tree | d04b4d167d797f697eaafdb5068ab8936f507852 | |
parent | af6b2afffaa25d0630807b16add9d614f6d85454 (diff) | |
download | scons-git-deb6e40f0ffa92140e0ac016407c9a53e1b7c1ea.tar.gz |
swap / to \ for win32 and regex escape that
-rw-r--r-- | test/TempFileMunge/TEMPFILEDIR.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/TempFileMunge/TEMPFILEDIR.py b/test/TempFileMunge/TEMPFILEDIR.py index ced2fe935..b528be3b7 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) |