summaryrefslogtreecommitdiffstats
path: root/test/ZIP
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2020-08-06 03:20:46 (GMT)
committerWilliam Deegan <bill@baddogconsulting.com>2020-08-06 03:20:46 (GMT)
commitbf7eb144df61fd040bd149d06dab9fb4d85208d1 (patch)
tree1b0a7e274572d391e96253dca80eb8fc27eb5376 /test/ZIP
parent261a39beb80b064793009f4ec9a5b367fb5b93bb (diff)
downloadSCons-bf7eb144df61fd040bd149d06dab9fb4d85208d1.zip
SCons-bf7eb144df61fd040bd149d06dab9fb4d85208d1.tar.gz
SCons-bf7eb144df61fd040bd149d06dab9fb4d85208d1.tar.bz2
Fix zip tool to respect ZIPCOMSTR if it's set after an Environment or Tool('zip') is initialized. (It works fine if set in Environment()) Previous PR was #3659 by Rocco Matano
Diffstat (limited to 'test/ZIP')
-rw-r--r--test/ZIP/ZIPCOMSTR.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ZIP/ZIPCOMSTR.py b/test/ZIP/ZIPCOMSTR.py
index af9ba57..43566fb 100644
--- a/test/ZIP/ZIPCOMSTR.py
+++ b/test/ZIP/ZIPCOMSTR.py
@@ -42,12 +42,21 @@ env = Environment(tools=['zip'],
ZIPCOM = r'%(_python_)s mycompile.py zip $TARGET $SOURCES',
ZIPCOMSTR = 'Zipping $TARGET from $SOURCE')
env.Zip('aaa.zip', 'aaa.in')
+
+# Issue explained in PR #3569 - setting ZIPCOM/ZIPCOMSTR after env initialization
+# is ignored and yields zip() instead of desired ZIPCOMSTR>
+env2 = Environment(tools=['zip'])
+env2['ZIPCOM'] = r'%(_python_)s mycompile.py zip $TARGET $SOURCES'
+env2['ZIPCOMSTR']="TESTING ONE TWO THREE $TARGET from $SOURCE"
+env2.Zip('aaa2.zip', 'aaa.in')
+
""" % locals())
test.write('aaa.in', 'aaa.in\n/*zip*/\n')
test.run(stdout = test.wrap_stdout("""\
Zipping aaa.zip from aaa.in
+TESTING ONE TWO THREE aaa2.zip from aaa.in
"""))
test.must_match('aaa.zip', "aaa.in\n")