summaryrefslogtreecommitdiffstats
path: root/test/option--implicit-cache.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2002-05-15 21:26:08 (GMT)
committerSteven Knight <knight@baldmt.com>2002-05-15 21:26:08 (GMT)
commitc4d35e362f544b427d400f4fb1f95da2236976ef (patch)
tree0097695ec792aa5410cda02d3fd8ef4d4a20d2d0 /test/option--implicit-cache.py
parentf90f72f7e364490fa345681b863cbec55555fa40 (diff)
downloadSCons-c4d35e362f544b427d400f4fb1f95da2236976ef.zip
SCons-c4d35e362f544b427d400f4fb1f95da2236976ef.tar.gz
SCons-c4d35e362f544b427d400f4fb1f95da2236976ef.tar.bz2
Fix a --implicit-cache when a file has no implicit deps and its source is generated. (Anthony Roach)
Diffstat (limited to 'test/option--implicit-cache.py')
-rw-r--r--test/option--implicit-cache.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/option--implicit-cache.py b/test/option--implicit-cache.py
index 9a28271..704668b 100644
--- a/test/option--implicit-cache.py
+++ b/test/option--implicit-cache.py
@@ -53,6 +53,11 @@ BuildDir('variant', 'subdir', 0)
include = Dir('include')
env = Environment(CPPPATH=['inc2', include])
SConscript('variant/SConscript', "env")
+
+def copy(target, source, env):
+ open(str(target[0]), 'wt').write(open(str(source[0]), 'rt').read())
+nodep = env.Command('nodeps.c', 'nodeps.in', action=copy)
+env.Program('nodeps', 'nodeps.c')
""")
test.write(['subdir', 'SConscript'],
@@ -61,6 +66,17 @@ Import("env")
env.Program(target='prog', source='prog.c')
""")
+test.write('nodeps.in',
+r"""
+int
+main(int argc, char *argv[])
+{
+ argv[argc++] = "--";
+ return 0;
+}
+""")
+
+
test.write(['include', 'foo.h'],
r"""
#define FOO_STRING "include/foo.h 1\n"
@@ -223,4 +239,8 @@ test.run(program = test.workpath(subdir_prog),
test.run(program = test.workpath(variant_prog),
stdout = "subdir/prog.c\ninclude/foo.h 3\ninclude/bar.h 1\n")
+# test in the face of a file with no dependencies where the source file is generated:
+test.run(arguments = "--implicit-cache nodeps%s"%_exe)
+
+
test.pass_test()