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

__revision__ = "__FILE__ __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[])
{
	argv[argc++] = "--";
	printf("foo.c\n");
	exit (0);
}
""")

test.run(arguments = 'foo')

test.run(program = test.workpath('foo'), stdout = "foo.c\n")

test.pass_test()