blob: 78edf9222097f1b944cba8007d16dfaf69f2afa2 (
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
|
#!/usr/bin/env python
__revision__ = "test/Program.py __REVISION__ __DATE__ __DEVELOPER__"
import TestCmd
test = TestCmd.TestCmd(program = 'scons.py',
workdir = '',
interpreter = 'python')
test.write('SConstruct', """
env = Environment()
env.Program(target = 'foo', source = 'foo.c')
""")
test.write('foo.c', """
int
main(int argc, char *argv[])
{
printf("foo.c\n");
exit (0);
}
""")
test.run(chdir = '.', arguments = 'foo')
test.run(program = test.workpath('foo'))
test.fail_test(test.stdout() != "foo.c\n")
test.pass_test()
|