Skip to content

Commit b145e02

Browse files
committed
ts: improve coverage of getLoadedPrereqPath proc
1 parent d63bc0e commit b145e02

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

testsuite/example/siteconfig.tcl-1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -660,6 +660,11 @@ if {[info exists env(TESTSUITE_ENABLE_SITECONFIG_CHANGECONTEXTOFMODULEEVAL)]} {
660660
}
661661
}
662662

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

664669

665670
}

testsuite/modules.00-init/120-siteconfig.exp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -727,6 +727,13 @@ lappend ans $vers_reportre
727727
testouterr_cmd_re sh -V OK [join $ans \n]
728728
unsetenv_var TESTSUITE_ENABLE_SITECONFIG_CHANGECONTEXTOFMODULEEVAL
729729

730+
setenv_var TESTSUITE_ENABLE_SITECONFIG_GETLOADEDPREREQPATH 1
731+
set ans [list]
732+
lappend ans 0
733+
lappend ans $vers_reportre
734+
testouterr_cmd_re sh -V OK [join $ans \n]
735+
unsetenv_var TESTSUITE_ENABLE_SITECONFIG_GETLOADEDPREREQPATH
736+
730737

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

0 commit comments

Comments
 (0)