Win32 portability fixes for various tests.
[scons.git] / test / option-v.py
index ae682364cee6631eca364978962c56fc01fee840..4adcf5ea9eb5315c0835645f21824e204c568707 100644 (file)
@@ -1,28 +1,47 @@
 #!/usr/bin/env python
-
-__revision__ = "test/option-v.py __REVISION__ __DATE__ __DEVELOPER__"
-
+#
+# Copyright (c) 2001, 2002 Steven Knight
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+
+__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
+
+import TestCmd
 import TestSCons
 import string
 import sys
 
-test = TestSCons.TestSCons()
+test = TestSCons.TestSCons(match = TestCmd.match_re)
 
 test.write('SConstruct', "")
 
-test.run(arguments = '-v')
-
-expect = r"""SCons version \S+, by Steven Knight et al.
-Copyright 2001 Steven Knight
+expect = 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.fail_test(not test.match_re(test.stdout(), expect))
-test.fail_test(test.stderr() != "")
-
-test.run(arguments = '--version')
+test.run(arguments = '-v', stdout = expect)
 
-test.fail_test(not test.match_re(test.stdout(), expect))
-test.fail_test(test.stderr() != "")
+test.run(arguments = '--version', stdout = expect)
 
 test.pass_test()