Add more information error reporting from tests.
[scons.git] / test / option--I.py
1 #!/usr/bin/env python
2
3 __revision__ = "test/option--I.py __REVISION__ __DATE__ __DEVELOPER__"
4
5 import TestSCons
6 import string
7 import sys
8
9 test = TestSCons.TestSCons()
10
11 test.subdir('sub1', 'sub2')
12
13 test.write(['sub1', 'foo.py'], """
14 variable = "sub1/foo"
15 """)
16
17 test.write(['sub2', 'foo.py'], """
18 variable = "sub2/foo"
19 """)
20
21 test.write(['sub2', 'bar.py'], """
22 variable = "sub2/bar"
23 """)
24
25 test.write('SConstruct', """
26 import foo
27 print foo.variable
28 import bar
29 print bar.variable
30 """)
31
32 test.run(arguments = '-I sub1 -I sub2', stdout = "sub1/foo\nsub2/bar\n")
33
34 test.run(arguments = '--include-dir=sub2 --include-dir=sub1',
35          stdout = "sub2/foo\nsub2/bar\n")
36
37 test.pass_test()
38