summaryrefslogtreecommitdiffstats
path: root/test/CacheDir.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2004-01-17 14:56:46 (GMT)
committerSteven Knight <knight@baldmt.com>2004-01-17 14:56:46 (GMT)
commit5935721ed785abc27060cacc7854a7c6e8242c03 (patch)
tree0d41d084dbebe2ae095a823949a9dfcbdaa0706a /test/CacheDir.py
parentd5c45b4bbb0ffa37191b753f9a230b60702de27a (diff)
downloadSCons-5935721ed785abc27060cacc7854a7c6e8242c03.zip
SCons-5935721ed785abc27060cacc7854a7c6e8242c03.tar.gz
SCons-5935721ed785abc27060cacc7854a7c6e8242c03.tar.bz2
Fix retrieving multiple target files from cache. (Bob Halley)
Diffstat (limited to 'test/CacheDir.py')
-rw-r--r--test/CacheDir.py28
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()