diff options
author | Steven Knight <knight@baldmt.com> | 2004-01-17 14:56:46 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2004-01-17 14:56:46 (GMT) |
commit | 18d748a479233b689144db11a2ac3643a6577273 (patch) | |
tree | 0d41d084dbebe2ae095a823949a9dfcbdaa0706a /test/CacheDir.py | |
parent | 0efe8eaf133ccf1386df12436d4cca218121280c (diff) | |
download | SCons-18d748a479233b689144db11a2ac3643a6577273.zip SCons-18d748a479233b689144db11a2ac3643a6577273.tar.gz SCons-18d748a479233b689144db11a2ac3643a6577273.tar.bz2 |
Fix retrieving multiple target files from cache. (Bob Halley)
Diffstat (limited to 'test/CacheDir.py')
-rw-r--r-- | test/CacheDir.py | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/CacheDir.py b/test/CacheDir.py index a906b6a..44dd708 100644 --- a/test/CacheDir.py +++ b/test/CacheDir.py @@ -270,5 +270,33 @@ test.run(chdir = 'subdir') test.fail_test(os.path.exists(test.workpath('cache3', 'N', 'None'))) +############################################################################# +# Test that multiple target files get retrieved from cache correctly. + +test.subdir('multiple', 'cache4') + +test.write(['multiple', 'SConstruct'], """\ +CacheDir(r'%s') +env = Environment() +env.Command(['foo', 'bar'], ['input'], 'touch foo bar') +""" % (test.workpath('cache4'))) + +test.write(['multiple', 'input'], "multiple/input\n") + +test.run(chdir = 'multiple') + +test.fail_test(not os.path.exists(test.workpath('multiple', 'foo'))) +test.fail_test(not os.path.exists(test.workpath('multiple', 'bar'))) + +test.run(chdir = 'multiple', arguments = '-c') + +test.fail_test(os.path.exists(test.workpath('multiple', 'foo'))) +test.fail_test(os.path.exists(test.workpath('multiple', 'bar'))) + +test.run(chdir = 'multiple') + +test.fail_test(not os.path.exists(test.workpath('multiple', 'foo'))) +test.fail_test(not os.path.exists(test.workpath('multiple', 'bar'))) + # All done. test.pass_test() |