Skip to content

Commit c6f7291

Browse files
committed
ts: improve coverage of getModulefileFromLoadingModule proc
1 parent b145e02 commit c6f7291

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
@@ -666,5 +666,10 @@ if {[info exists env(TESTSUITE_ENABLE_SITECONFIG_GETLOADEDPREREQPATH)]} {
666666
report [string length [getLoadedPrereqPath foo qux]]
667667
}
668668

669+
# specific tests to improve getModulefileFromLoadingModule coverage
670+
if {[info exists env(TESTSUITE_ENABLE_SITECONFIG_GETMODULEFILEFROMLOADINGMODULE)]} {
671+
report [string length [getModulefileFromLoadingModule foo]]
672+
}
673+
669674

670675
}

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -734,6 +734,13 @@ lappend ans $vers_reportre
734734
testouterr_cmd_re sh -V OK [join $ans \n]
735735
unsetenv_var TESTSUITE_ENABLE_SITECONFIG_GETLOADEDPREREQPATH
736736

737+
setenv_var TESTSUITE_ENABLE_SITECONFIG_GETMODULEFILEFROMLOADINGMODULE 1
738+
set ans [list]
739+
lappend ans 0
740+
lappend ans $vers_reportre
741+
testouterr_cmd_re sh -V OK [join $ans \n]
742+
unsetenv_var TESTSUITE_ENABLE_SITECONFIG_GETMODULEFILEFROMLOADINGMODULE
743+
737744

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

0 commit comments

Comments
 (0)