diff options
author | Mats Wichmann <mats@linux.com> | 2019-08-29 17:43:01 (GMT) |
---|---|---|
committer | Mats Wichmann <mats@linux.com> | 2019-09-07 22:54:59 (GMT) |
commit | 709bbe03fc4ba1cd12d6f51c79a2bc06b7f790f3 (patch) | |
tree | d9aa260208f0beaf48b32f3e8c86308208c15a29 /test/Subst | |
parent | 223d0c5b9d0887d1fd54613932139352296566f7 (diff) | |
download | SCons-709bbe03fc4ba1cd12d6f51c79a2bc06b7f790f3.zip SCons-709bbe03fc4ba1cd12d6f51c79a2bc06b7f790f3.tar.gz SCons-709bbe03fc4ba1cd12d6f51c79a2bc06b7f790f3.tar.bz2 |
CmdStringHolder should not fail in Subst
Pass 1: test case showing the failure.
This is WIP - need to add the fix, but want a CI build to show the fail.
Closes issues #3248
Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'test/Subst')
-rw-r--r-- | test/Subst/bug3428.py | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/test/Subst/bug3428.py b/test/Subst/bug3428.py new file mode 100644 index 0000000..00587e6 --- /dev/null +++ b/test/Subst/bug3428.py @@ -0,0 +1,55 @@ +#!/usr/bin/env python +# +# __COPYRIGHT__ +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# 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__" + +""" +Verify that CmdStringHolder doesn't trip in Subst on doing +a string-only operation that does not work on UserString class. +Issue: https://github.com/SCons/scons/issues/3428 +""" + +import TestSCons + +test = TestSCons.TestSCons(match = TestSCons.match_re_dotall) + + +test.write('SConstruct', """\ +env = Environment() +env.Append(LIBPATH=["path1/sub1","path1/sub2"]) +lst = env.Flatten(env.subst_list("$LIBPATH")) +for i in lst: + env.Dir(i) +""") + +test.run(status=0) + + +test.pass_test() + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: |