summaryrefslogtreecommitdiffstats
path: root/test/Program.py
blob: 8fb0fa4a44e0d1e32eaa454d2b48377855bc6117 (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
#!/usr/bin/env python

__revision__ = "test/Program.py __REVISION__ __DATE__ __DEVELOPER__"

import TestSCons

test = TestSCons.TestSCons()

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(arguments = 'foo')

test.run(program = test.workpath('foo'))

test.fail_test(test.stdout() != "foo.c\n")

test.pass_test()