summaryrefslogtreecommitdiffstats
path: root/test/SConstruct.py
blob: 6f1ce2540c60b8d4b0b5b54e09eb1b82959aeff1 (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
39
40
41
#!/usr/bin/env python

__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"

import TestCmd
import TestSCons

test = TestSCons.TestSCons(match = TestCmd.match_re)

test.run(stdout = "",
	stderr = """
SCons error: No SConstruct file found.
File "\S+scons(\.py)?", line \d+, in main
""")

test.match_func = TestCmd.match_exact

wpath = test.workpath()

test.write('sconstruct', """
import os
print "sconstruct", os.getcwd()
""")

test.run(stdout = "sconstruct %s\n" % wpath)

test.write('Sconstruct', """
import os
print "Sconstruct", os.getcwd()
""")

test.run(stdout = "Sconstruct %s\n" % wpath)

test.write('SConstruct', """
import os
print "SConstruct", os.getcwd()
""")

test.run(stdout = "SConstruct %s\n" % wpath)

test.pass_test()