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

__revision__ = "test/option-v.py __REVISION__ __DATE__ __DEVELOPER__"

import TestCmd
import string
import sys

test = TestCmd.TestCmd(program = 'scons.py',
                       workdir = '',
                       interpreter = 'python')

test.write('SConstruct', "")

test.run(chdir = '.', arguments = '-v')

expect = r"""SCons version \S+, by Steven Knight et al.
Copyright 2001 Steven Knight
"""

test.fail_test(not test.match_re(test.stdout(), expect))
test.fail_test(test.stderr() != "")

test.run(chdir = '.', arguments = '--version')

test.fail_test(not test.match_re(test.stdout(), expect))
test.fail_test(test.stderr() != "")

test.pass_test()