From: stevenknight Date: Sat, 29 Sep 2001 03:22:21 +0000 (+0000) Subject: Make match_exact the default match function for TestSCons. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ffe625ab62932b12a365433fb7022e4ac4649ce9;p=scons.git Make match_exact the default match function for TestSCons. git-svn-id: http://scons.tigris.org/svn/scons/trunk@74 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- diff --git a/etc/TestSCons.py b/etc/TestSCons.py index 31419894..959e568d 100644 --- a/etc/TestSCons.py +++ b/etc/TestSCons.py @@ -45,6 +45,7 @@ class TestSCons(TestCmd.TestCmd): program = 'scons' if it exists, else 'scons.py' interpreter = 'python' + match = TestCmd.match_exact workdir = '' The workdir value means that, by default, a temporary workspace @@ -60,6 +61,8 @@ class TestSCons(TestCmd.TestCmd): kw['program'] = 'scons.py' if not kw.has_key('interpreter'): kw['interpreter'] = 'python' + if not kw.has_key('match'): + kw['match'] = TestCmd.match_exact if not kw.has_key('workdir'): kw['workdir'] = '' apply(TestCmd.TestCmd.__init__, [self], kw) diff --git a/test/SCONSFLAGS.py b/test/SCONSFLAGS.py index 274ab47a..3ae3a798 100644 --- a/test/SCONSFLAGS.py +++ b/test/SCONSFLAGS.py @@ -2,11 +2,12 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" +import TestCmd +import TestSCons import os import string -import TestSCons -test = TestSCons.TestSCons() +test = TestSCons.TestSCons(match = TestCmd.match_re) wpath = test.workpath() diff --git a/test/SConstruct.py b/test/SConstruct.py index 8837b62d..6f1ce254 100644 --- a/test/SConstruct.py +++ b/test/SConstruct.py @@ -2,9 +2,10 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" +import TestCmd import TestSCons -test = TestSCons.TestSCons() +test = TestSCons.TestSCons(match = TestCmd.match_re) test.run(stdout = "", stderr = """ @@ -12,6 +13,8 @@ SCons error: No SConstruct file found. File "\S+scons(\.py)?", line \d+, in main """) +test.match_func = TestCmd.match_exact + wpath = test.workpath() test.write('sconstruct', """ diff --git a/test/errors.py b/test/errors.py index f94ebe5c..545db5a0 100644 --- a/test/errors.py +++ b/test/errors.py @@ -2,9 +2,10 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" +import TestCmd import TestSCons -test = TestSCons.TestSCons() +test = TestSCons.TestSCons(match = TestCmd.match_re) test.write('SConstruct1', """ a ! x diff --git a/test/exitfns.py b/test/exitfns.py index 49afa932..cc478c8a 100644 --- a/test/exitfns.py +++ b/test/exitfns.py @@ -2,10 +2,9 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" -import TestCmd import TestSCons -test = TestSCons.TestSCons(match = TestCmd.match_exact) +test = TestSCons.TestSCons() sconstruct = """ from SCons.exitfuncs import * diff --git a/test/option-unknown.py b/test/option-unknown.py index 28d3ceb8..7240b965 100644 --- a/test/option-unknown.py +++ b/test/option-unknown.py @@ -2,11 +2,12 @@ __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', "") @@ -17,4 +18,3 @@ test.run(arguments = '--ZizzerZazzerZuzz', stderr = '\nSCons error: option --ZizzerZazzerZuzz not recognized\nFile "\S+", line \d+, in long_has_args\n') test.pass_test() - diff --git a/test/option-v.py b/test/option-v.py index b65e4d05..5f67b05c 100644 --- a/test/option-v.py +++ b/test/option-v.py @@ -2,11 +2,12 @@ __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', "")