aboutsummaryrefslogtreecommitdiff
path: root/testsuite/runtest.libs/dg.test
diff options
context:
space:
mode:
authorJacob Bachmeyer <jcb@gnu.org>2022-10-04 22:05:48 -0500
committerJacob Bachmeyer <jcb@gnu.org>2022-10-04 22:05:48 -0500
commite2c7bcea007e61d7a1f77576c36fa233706d916d (patch)
tree7871d3dcc20d5473c44fa3f1a96a7edd0046e4d7 /testsuite/runtest.libs/dg.test
parentae2a87b9147553380cfdef903d089fd6a094b859 (diff)
Add regression test for PR58065
Diffstat (limited to 'testsuite/runtest.libs/dg.test')
-rw-r--r--testsuite/runtest.libs/dg.test8
1 files changed, 7 insertions, 1 deletions
diff --git a/testsuite/runtest.libs/dg.test b/testsuite/runtest.libs/dg.test
index bdfc0b1..8c9b87b 100644
--- a/testsuite/runtest.libs/dg.test
+++ b/testsuite/runtest.libs/dg.test
@@ -44,7 +44,7 @@ proc mock-dg-test { prog what flags } {
while { [gets $chan line] >= 0 } {
incr linum
- if { [regexp -- {^%([EWO])\s+([^\r\n{}]*)} $line -> item text] } {
+ if { [regexp -- {^\s*%([EWO])\s+([^\r\n{}]*)} $line -> item text] } {
switch -- $item {
E { append output "$prog:$linum: error: $text\n" }
W { append output "$prog:$linum: warning: $text\n" }
@@ -176,6 +176,9 @@ create_mock_file dg-test-vfs \
foreach {result} { unresolved unsupported untested } {
create_mock_file dg-test-vfs "dg/pskip-${result}" \
"#test file for dg.exp\n%O --${result}: skip by prune--\n"
+ create_mock_file dg-test-vfs "dg/pr58065/pskip-${result}" \
+ "#test file\n{ dg-error foo \"never produced\" }\n\
+ %O --${result}: skip by prune--\n"
}
dg-test-1 eval {proc send_log { text } { puts $text }}
@@ -280,6 +283,9 @@ foreach {result} { unresolved unsupported untested } {
test_proc_with_mocks "test with dg/pskip-${result}" dg-test-1 \
[list dg-runtest dg/pskip-${result} "" ""] \
check_calls $check_calls
+ test_proc_with_mocks "test with dg/pr58065/pskip-${result}" dg-test-1 \
+ [list dg-runtest dg/pr58065/pskip-${result} "" ""] \
+ check_calls $check_calls
}
dg-test-1 eval dg-finish