diff options
author | Jacob Bachmeyer <jcb@gnu.org> | 2022-10-01 17:36:56 -0500 |
---|---|---|
committer | Jacob Bachmeyer <jcb@gnu.org> | 2022-10-01 17:36:56 -0500 |
commit | 51e4b3f6891b42bfa3b5617a0a52193348f74efe (patch) | |
tree | 97cf6bf36d0c2ae5323a544c0f033fcdd0e21599 /testsuite/runtest.libs | |
parent | af1760154d4607fa59b1c4e06df59f8ae474b440 (diff) | |
download | dejagnu-51e4b3f6891b42bfa3b5617a0a52193348f74efe.zip dejagnu-51e4b3f6891b42bfa3b5617a0a52193348f74efe.tar.gz dejagnu-51e4b3f6891b42bfa3b5617a0a52193348f74efe.tar.bz2 |
Add unit tests with explicit line numbers for lib/dg.exp
Diffstat (limited to 'testsuite/runtest.libs')
-rw-r--r-- | testsuite/runtest.libs/dg.test | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/runtest.libs/dg.test b/testsuite/runtest.libs/dg.test index e0a2416..617a4b7 100644 --- a/testsuite/runtest.libs/dg.test +++ b/testsuite/runtest.libs/dg.test @@ -96,6 +96,7 @@ create_test_interpreter dg-test-1 { mocks { # minor test shims prune_warnings { text } { $text } + isnative { } { 1 } unknown { args } { [error "unknown $args"] } # results collection pass { message } { 0 } @@ -121,6 +122,12 @@ foreach {type token line} { } { create_mock_file dg-test-vfs "dg/basic-${type}-${token}" \ "# test file for dg.exp\n$line\n" + if { $token ne "build" && $token ne "excess" } { + regsub -- {\{ dg-} $line "\n\n&" line + regsub -- { \}\Z} $line " {target *-*-*} 2&" line + create_mock_file dg-test-vfs "dg/linum-${type}-${token}" \ + "#test file for dg.exp\n$line\n" + } } dg-test-1 eval {proc send_log { text } { puts $text }} @@ -159,6 +166,11 @@ foreach { type token message } { test_proc_with_mocks "test with dg/basic-${type}-${token}" dg-test-1 \ [list dg-runtest dg/basic-${type}-${token} "" ""] \ check_calls $check_calls + if { $token ne "build" && $token ne "excess" } { + test_proc_with_mocks "test with dg/linum-${type}-${token}" dg-test-1 \ + [list dg-runtest dg/linum-${type}-${token} "" ""] \ + check_calls $check_calls + } } dg-test-1 eval dg-finish |