Skip to content

Commit

Permalink
ts: improve coverage of getLoadedPrereqPath proc
Browse files Browse the repository at this point in the history
  • Loading branch information
xdelaruelle committed Nov 10, 2024
1 parent d63bc0e commit b145e02
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions testsuite/example/siteconfig.tcl-1
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,11 @@ if {[info exists env(TESTSUITE_ENABLE_SITECONFIG_CHANGECONTEXTOFMODULEEVAL)]} {
}
}

# specific tests to improve getLoadedPrereqPath coverage
if {[info exists env(TESTSUITE_ENABLE_SITECONFIG_GETLOADEDPREREQPATH)]} {
set ::g_loadedModulePrereqPath(foo) {bar mp}
report [string length [getLoadedPrereqPath foo qux]]
}


}
7 changes: 7 additions & 0 deletions testsuite/modules.00-init/120-siteconfig.exp
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,13 @@ lappend ans $vers_reportre
testouterr_cmd_re sh -V OK [join $ans \n]
unsetenv_var TESTSUITE_ENABLE_SITECONFIG_CHANGECONTEXTOFMODULEEVAL

setenv_var TESTSUITE_ENABLE_SITECONFIG_GETLOADEDPREREQPATH 1
set ans [list]
lappend ans 0
lappend ans $vers_reportre
testouterr_cmd_re sh -V OK [join $ans \n]
unsetenv_var TESTSUITE_ENABLE_SITECONFIG_GETLOADEDPREREQPATH


} elseif {$verbose} {
send_user "\tSkip tests relying on an excepted siteconfig file installed\n"
Expand Down

0 comments on commit b145e02

Please sign in to comment.