summaryrefslogtreecommitdiff
path: root/test/Removed
diff options
context:
space:
mode:
authorMats Wichmann <mats@linux.com>2019-10-21 13:42:39 -0600
committerMats Wichmann <mats@linux.com>2019-10-21 13:42:39 -0600
commit9c900844191f129d899dd48cc2fa96f9539d4ff6 (patch)
treeaaf2e2a7853b527a22171dab8d67121cf0060746 /test/Removed
parent9c4e6c7a303047e4b26e58af749508f7e254ae89 (diff)
downloadscons-git-9c900844191f129d899dd48cc2fa96f9539d4ff6.tar.gz
[PR 3464] rework new tests so they match stderr
The re.DOTALL match function somehow wasn't matching the SConstruct error path, so build it up from known information instead. Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'test/Removed')
-rw-r--r--test/Removed/SourceSignatures/SourceSignatures.py15
-rw-r--r--test/Removed/TargetSignatures/TargetSignatures.py15
2 files changed, 20 insertions, 10 deletions
diff --git a/test/Removed/SourceSignatures/SourceSignatures.py b/test/Removed/SourceSignatures/SourceSignatures.py
index fcc5e432e..014c1636c 100644
--- a/test/Removed/SourceSignatures/SourceSignatures.py
+++ b/test/Removed/SourceSignatures/SourceSignatures.py
@@ -31,15 +31,15 @@ are definitely gone.
import TestSCons
-test = TestSCons.TestSCons(match=TestSCons.match_re_dotall)
+test = TestSCons.TestSCons()
test.file_fixture('SConstruct.method', 'SConstruct')
-test.run(arguments='-Q -s', status=2, stdout=None,
- stderr="""\
+expect = """\
NameError: name 'SourceSignatures' is not defined:
- File ".+SConstruct", line 1:
+ File "{}", line 1:
SourceSignatures('MD5')
-""")
+""".format(test.workpath('SConstruct'))
+test.run(arguments='-Q -s', status=2, stdout=None, stderr=expect)
test.file_fixture('SConstruct.setopt', 'SConstruct')
test.run(arguments='-Q -s', status=0, stdout=None,
@@ -50,3 +50,8 @@ No warning type: 'deprecated-source-signatures'
test.pass_test()
+# Local Variables:
+# tab-width:4
+# indent-tabs-mode:nil
+# End:
+# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/test/Removed/TargetSignatures/TargetSignatures.py b/test/Removed/TargetSignatures/TargetSignatures.py
index 0b3a37b8b..889f992b7 100644
--- a/test/Removed/TargetSignatures/TargetSignatures.py
+++ b/test/Removed/TargetSignatures/TargetSignatures.py
@@ -31,15 +31,15 @@ are definitely gone.
import TestSCons
-test = TestSCons.TestSCons(match=TestSCons.match_re_dotall)
+test = TestSCons.TestSCons()
test.file_fixture('SConstruct.method', 'SConstruct')
-test.run(arguments='-Q -s', status=2, stdout=None,
- stderr="""\
+expect = """\
NameError: name 'TargetSignatures' is not defined:
- File ".+SConstruct", line 1:
+ File "{}", line 1:
TargetSignatures('MD5')
-""")
+""".format(test.workpath('SConstruct'))
+test.run(arguments='-Q -s', status=2, stdout=None, stderr=expect)
test.file_fixture('SConstruct.setopt', 'SConstruct')
test.run(arguments="-Q -s", status=0, stdout=None,
@@ -50,3 +50,8 @@ No warning type: 'deprecated-target-signatures'
test.pass_test()
+# Local Variables:
+# tab-width:4
+# indent-tabs-mode:nil
+# End:
+# vim: set expandtab tabstop=4 shiftwidth=4: