diff options
Diffstat (limited to 'test/Value.py')
-rw-r--r-- | test/Value.py | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/test/Value.py b/test/Value.py index 85fcbd1..fd7afb7 100644 --- a/test/Value.py +++ b/test/Value.py @@ -35,13 +35,9 @@ _python_ = TestSCons._python_ test = TestSCons.TestSCons(match=TestCmd.match_re) -# Run all of the tests with both types of source signature -# to make sure there's no difference in behavior. -for source_signature in ['MD5', 'timestamp']: +python = TestSCons.python - print "Testing Value node with source signatures:", source_signature - - test.write('SConstruct', """ +SConstruct_content = """ SourceSignatures(r'%(source_signature)s') class Custom: @@ -57,7 +53,7 @@ def create(target, source, env): env = Environment() env['BUILDERS']['B'] = Builder(action = create) -env['BUILDERS']['S'] = Builder(action = '%(_python_)s put $SOURCES into $TARGET') +env['BUILDERS']['S'] = Builder(action = r'%(_python_)s put.py $SOURCES into $TARGET') env.B('f1.out', Value(P)) env.B('f2.out', env.Value(L)) env.B('f3.out', Value(C)) @@ -75,15 +71,23 @@ env['BUILDERS']['B3'] = Builder(action = create_value_file) V = Value('my value') env.B2(V, 'f3.out') env.B3('f5.out', V) -""" % locals()) +""" - test.write('put', """ +test.write('put.py', """\ import os import string import sys open(sys.argv[-1],'wb').write(string.join(sys.argv[1:-2])) """) +# Run all of the tests with both types of source signature +# to make sure there's no difference in behavior. +for source_signature in ['MD5', 'timestamp']: + + print "Testing Value node with source signatures:", source_signature + + test.write('SConstruct', SConstruct_content % locals()) + test.run(arguments='-c') test.run() |