summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2001-09-11 17:04:00 (GMT)
committerSteven Knight <knight@baldmt.com>2001-09-11 17:04:00 (GMT)
commit97ece7f03bffd693693e7da376a3a7058d14b7a7 (patch)
tree7517de7e6ea6c01b8999f8f2d1ada488beb61b1b /test
parent6bea3fd00327560933ef42779a58ac3e11f187c8 (diff)
downloadSCons-97ece7f03bffd693693e7da376a3a7058d14b7a7.zip
SCons-97ece7f03bffd693693e7da376a3a7058d14b7a7.tar.gz
SCons-97ece7f03bffd693693e7da376a3a7058d14b7a7.tar.bz2
Add -I support.
Diffstat (limited to 'test')
-rw-r--r--test/option--I.py33
1 files changed, 26 insertions, 7 deletions
diff --git a/test/option--I.py b/test/option--I.py
index f205a76..80de467 100644
--- a/test/option--I.py
+++ b/test/option--I.py
@@ -10,17 +10,36 @@ test = TestCmd.TestCmd(program = 'scons.py',
workdir = '',
interpreter = 'python')
-test.write('SConstruct', "")
+test.subdir('sub1', 'sub2')
-test.run(chdir = '.', arguments = '-I foo')
+test.write(['sub1', 'foo.py'], """
+variable = "sub1/foo"
+""")
-test.fail_test(test.stderr() !=
- "Warning: the -I option is not yet implemented\n")
+test.write(['sub2', 'foo.py'], """
+variable = "sub2/foo"
+""")
-test.run(chdir = '.', arguments = '--include-dir=foo')
+test.write(['sub2', 'bar.py'], """
+variable = "sub2/bar"
+""")
-test.fail_test(test.stderr() !=
- "Warning: the --include-dir option is not yet implemented\n")
+test.write('SConstruct', """
+import foo
+print foo.variable
+import bar
+print bar.variable
+""")
+
+test.run(chdir = '.', arguments = '-I sub1 -I sub2')
+
+test.fail_test(test.stdout() != "sub1/foo\nsub2/bar\n")
+test.fail_test(test.stderr() != "")
+
+test.run(chdir = '.', arguments = '--include-dir=sub2 --include-dir=sub1')
+
+test.fail_test(test.stdout() != "sub2/foo\nsub2/bar\n")
+test.fail_test(test.stderr() != "")
test.pass_test()