Add a TestSCons module for common initialization of SCons tests.
[scons.git] / test / SConstruct.py
1 #!/usr/bin/env python
2
3 __revision__ = "test/SConstruct.py __REVISION__ __DATE__ __DEVELOPER__"
4
5 import TestSCons
6
7 test = TestSCons.TestSCons()
8
9 wpath = test.workpath()
10
11 test.write('sconstruct', """
12 import os
13 print "sconstruct", os.getcwd()
14 """)
15
16 test.run(chdir = '.')
17
18 test.fail_test(test.stdout() != ("sconstruct %s\n" % wpath))
19
20 test.write('Sconstruct', """
21 import os
22 print "Sconstruct", os.getcwd()
23 """)
24
25 test.run(chdir = '.')
26
27 test.fail_test(test.stdout() != ("Sconstruct %s\n" % wpath))
28
29 test.write('SConstruct', """
30 import os
31 print "SConstruct", os.getcwd()
32 """)
33
34 test.run(chdir = '.')
35
36 test.fail_test(test.stdout() != ("SConstruct %s\n" % wpath))
37
38 test.pass_test()