summaryrefslogtreecommitdiffstats
path: root/test/option--I.py
blob: d39cf85a99bc6799cb9414476d2da24fc8e52f68 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env python

__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"

import TestSCons
import string
import sys

test = TestSCons.TestSCons()

test.subdir('sub1', 'sub2')

test.write(['sub1', 'foo.py'], """
variable = "sub1/foo"
""")

test.write(['sub2', 'foo.py'], """
variable = "sub2/foo"
""")

test.write(['sub2', 'bar.py'], """
variable = "sub2/bar"
""")

test.write('SConstruct', """
import foo
print foo.variable
import bar
print bar.variable
""")

test.run(arguments = '-I sub1 -I sub2', stdout = "sub1/foo\nsub2/bar\n")

test.run(arguments = '--include-dir=sub2 --include-dir=sub1',
	 stdout = "sub2/foo\nsub2/bar\n")

test.pass_test()