summaryrefslogtreecommitdiff
path: root/test/option-v.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2002-07-14 17:57:51 +0000
committerSteven Knight <knight@baldmt.com>2002-07-14 17:57:51 +0000
commit4a6f158a8f3589b43fcda1c5ca50b743661a87f2 (patch)
treed4f9aaf64bc29cf5c8cc2d9bc8f72716996b4fd7 /test/option-v.py
parent721c0b5439329cce1a68d44c0e58204a83d9d354 (diff)
downloadscons-4a6f158a8f3589b43fcda1c5ca50b743661a87f2.tar.gz
Still more Win32 portability.
Diffstat (limited to 'test/option-v.py')
-rw-r--r--test/option-v.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/test/option-v.py b/test/option-v.py
index a0f7d938..0461e689 100644
--- a/test/option-v.py
+++ b/test/option-v.py
@@ -33,21 +33,26 @@ test = TestSCons.TestSCons(match = TestCmd.match_re)
test.write('SConstruct', "")
-if sys.platform == 'win32':
- expect = r"""SCons by Steven Knight et al.:
+# Win32 may or may not print a line for the script version
+# depending on whether it's invoked through scons.py or scons.bat.
+expect1 = r"""SCons by Steven Knight et al.:
\tengine: v\S+, [^,]*, by \S+ on \S+
Copyright 2001, 2002 Steven Knight
"""
-else:
- expect = r"""SCons by Steven Knight et al.:
+
+expect2 = r"""SCons by Steven Knight et al.:
\tscript: v\S+, [^,]*, by \S+ on \S+
\tengine: v\S+, [^,]*, by \S+ on \S+
Copyright 2001, 2002 Steven Knight
"""
-test.run(arguments = '-v', stdout = expect)
+test.run(arguments = '-v')
+test.fail_test(not test.match_re(test.stdout(), expect1) and
+ not test.match_re(test.stdout(), expect2))
-test.run(arguments = '--version', stdout = expect)
+test.run(arguments = '--version')
+test.fail_test(not test.match_re(test.stdout(), expect1) and
+ not test.match_re(test.stdout(), expect2))
test.pass_test()