summaryrefslogtreecommitdiffstats
path: root/test/RCS.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2004-01-29 06:57:54 (GMT)
committerSteven Knight <knight@baldmt.com>2004-01-29 06:57:54 (GMT)
commit2ae8d5022b9593ea1992f350a57010397c269c29 (patch)
tree904de3f7b723e87d7f4be938bf43532301084470 /test/RCS.py
parent1ed5ce4f1c15b7608fe2fa62be76f7a781f98faa (diff)
downloadSCons-2ae8d5022b9593ea1992f350a57010397c269c29.zip
SCons-2ae8d5022b9593ea1992f350a57010397c269c29.tar.gz
SCons-2ae8d5022b9593ea1992f350a57010397c269c29.tar.bz2
Fetch implicit dependencies from SCCS/RCS.
Diffstat (limited to 'test/RCS.py')
-rw-r--r--test/RCS.py46
1 files changed, 46 insertions, 0 deletions
diff --git a/test/RCS.py b/test/RCS.py
index 7be0080..93a985e 100644
--- a/test/RCS.py
+++ b/test/RCS.py
@@ -49,6 +49,8 @@ def is_writable(file):
mode = os.stat(file)[stat.ST_MODE]
return mode & stat.S_IWUSR
+
+
# Test explicit checkouts from local RCS files.
test.subdir('work1', ['work1', 'sub'])
@@ -137,6 +139,8 @@ test.fail_test(is_writable(test.workpath('work1', 'ccc.in')))
test.fail_test(is_writable(test.workpath('work1', 'sub', 'ddd.in')))
test.fail_test(is_writable(test.workpath('work1', 'sub', 'fff.in')))
+
+
# Test transparent RCS checkouts from an RCS subdirectory.
test.subdir('work2', ['work2', 'RCS'],
['work2', 'sub'], ['work2', 'sub', 'RCS'])
@@ -241,5 +245,47 @@ test.fail_test(not is_writable(test.workpath('work2', 'ccc.in')))
test.fail_test(not is_writable(test.workpath('work2', 'sub', 'ddd.in')))
test.fail_test(not is_writable(test.workpath('work2', 'sub', 'fff.in')))
+
+
+# Test transparent RCS checkouts of implicit dependencies.
+test.subdir('work3', ['work3', 'RCS'])
+
+test.write(['work3', 'foo.c'], """\
+#include "foo.h"
+int
+main(int argc, char *argv[]) {
+ printf(STR);
+ printf("work3/foo.c\\n");
+}
+""")
+test.run(chdir = 'work3',
+ program = ci,
+ arguments = "-f -tfoo.c foo.c",
+ stderr = None)
+
+test.write(['work3', 'foo.h'], """\
+#define STR "work3/foo.h\\n"
+""")
+test.run(chdir = 'work3',
+ program = ci,
+ arguments = "-f -tfoo.h foo.h",
+ stderr = None)
+
+test.write(['work3', 'SConstruct'], """
+env = Environment()
+env.Program('foo.c')
+""")
+
+test.run(chdir='work3', stderr="""\
+RCS/foo.c,v --> foo.c
+revision 1.1
+done
+RCS/foo.h,v --> foo.h
+revision 1.1
+done
+""")
+
+
+
#
test.pass_test()