From 39bc5ccf18d346c14ade0cce6e6f46e53b88fd97 Mon Sep 17 00:00:00 2001 From: Steven Knight Date: Sat, 29 Sep 2001 03:22:21 +0000 Subject: Make match_exact the default match function for TestSCons. --- etc/TestSCons.py | 3 +++ test/SCONSFLAGS.py | 5 +++-- test/SConstruct.py | 5 ++++- test/errors.py | 3 ++- test/exitfns.py | 3 +-- test/option-unknown.py | 4 ++-- test/option-v.py | 3 ++- 7 files changed, 17 insertions(+), 9 deletions(-) diff --git a/etc/TestSCons.py b/etc/TestSCons.py index 3141989..959e568 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 274ab47..3ae3a79 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 8837b62..6f1ce25 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 f94ebe5..545db5a 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 49afa93..cc478c8 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 28d3ceb..7240b96 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 b65e4d0..5f67b05 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', "") -- cgit v0.12