diff options
author | William Deegan <bill@baddogconsulting.com> | 2021-09-19 01:59:34 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2021-09-19 01:59:45 (GMT) |
commit | 98f40ebf2d5eebab488b286f313112cac9eb5141 (patch) | |
tree | 54b14403f4e2548e055f6d1097f22599614a19f2 /test | |
parent | b4d4449b3890121502758d503aacac1c5f138065 (diff) | |
download | SCons-98f40ebf2d5eebab488b286f313112cac9eb5141.zip SCons-98f40ebf2d5eebab488b286f313112cac9eb5141.tar.gz SCons-98f40ebf2d5eebab488b286f313112cac9eb5141.tar.bz2 |
Fix Issue #4021 - Textfile wrongly replacing '$$(' with '$' '
Diffstat (limited to 'test')
-rw-r--r-- | test/textfile/fixture/SConstruct | 5 | ||||
-rw-r--r-- | test/textfile/textfile.py | 11 |
2 files changed, 10 insertions, 6 deletions
diff --git a/test/textfile/fixture/SConstruct b/test/textfile/fixture/SConstruct index 8cfe909..60e7225 100644 --- a/test/textfile/fixture/SConstruct +++ b/test/textfile/fixture/SConstruct @@ -1,6 +1,5 @@ DefaultEnvironment(tools=[]) - env = Environment(tools=['textfile']) data0 = ['Goethe', 'Schiller'] data = ['lalala', 42, data0, 'tanteratei'] @@ -10,6 +9,10 @@ env.Textfile('foo2', data, LINESEPARATOR='|*') env.Textfile('foo1a.txt', data + ['']) env.Textfile('foo2a.txt', data + [''], LINESEPARATOR='|*') +issue_4021_textfile = r'<HintPath>..\..\..\@HINT_PATH@\Datalogics.PDFL.dll</HintPath>' +env.Textfile('issue-4021.txt', issue_4021_textfile, + SUBST_DICT={'@HINT_PATH@': r'NETCore\bin\$$(Platform)\$$(Configuration)'}) + # recreate the list with the data wrapped in Value() data0 = list(map(Value, data0)) data = list(map(Value, data)) diff --git a/test/textfile/textfile.py b/test/textfile/textfile.py index 0f2e18e..936eaf5 100644 --- a/test/textfile/textfile.py +++ b/test/textfile/textfile.py @@ -1,6 +1,7 @@ #!/usr/bin/env python +# MIT License # -# __COPYRIGHT__ +# Copyright The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -20,9 +21,6 @@ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# - -__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import TestSCons @@ -30,7 +28,7 @@ import os test = TestSCons.TestSCons() -foo1 = test.workpath('foo1.txt') +# foo1 = test.workpath('foo1.txt') # foo2 = test.workpath('foo2.txt') # foo1a = test.workpath('foo1a.txt') # foo2a = test.workpath('foo2a.txt') @@ -51,6 +49,8 @@ foo2Text = '|*'.join(textparts) foo1aText = foo1Text + linesep foo2aText = foo2Text + '|*' +issue_4021_text = r'<HintPath>..\..\..\NETCore\bin\$(Platform)\$(Configuration)\Datalogics.PDFL.dll</HintPath>' + test.up_to_date(arguments='.') files = list(map(test.workpath, ( @@ -81,6 +81,7 @@ test.must_match('foo1a.txt', foo1aText, mode=match_mode) test.must_match('bar1a.txt', foo1aText, mode=match_mode) test.must_match('foo2a.txt', foo2aText, mode=match_mode) test.must_match('bar2a.txt', foo2aText, mode=match_mode) +test.must_match('issue-4021.txt', issue_4021_text, mode=match_mode) check_times() # write the contents and make sure the files |