mirror of
https://github.com/envmodules/modules.git
synced 2026-06-14 00:42:43 +08:00
ts: add test to improve getInterpVar proc coverage
This commit is contained in:
@@ -584,4 +584,13 @@ if {[info exists env(TESTSUITE_ENABLE_SITECONFIG_MKDIR_COLLDIR)]} {
|
||||
}
|
||||
}
|
||||
|
||||
# specific test to improve getInterpVar proc coverage
|
||||
if {[info exists env(TESTSUITE_ENABLE_SITECONFIG_GETINTERPVAR)]} {
|
||||
interp create foo
|
||||
report [getInterpVar foo bar undef]
|
||||
foo eval {set bar value}
|
||||
report [getInterpVar foo bar undef]
|
||||
interp delete foo
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -608,6 +608,15 @@ set tserr "$error_msgs: Collection unk cannot be read.\n couldn't open \"/path/
|
||||
testouterr_cmd_re sh -V ERR $tserr
|
||||
unsetenv_var TESTSUITE_ENABLE_SITECONFIG_READCOLLCONTENT
|
||||
|
||||
# getInterpVar coverage test
|
||||
setenv_var TESTSUITE_ENABLE_SITECONFIG_GETINTERPVAR 1
|
||||
set ans [list]
|
||||
lappend ans undef
|
||||
lappend ans value
|
||||
lappend ans $vers_reportre
|
||||
testouterr_cmd_re sh -V OK [join $ans \n]
|
||||
unsetenv_var TESTSUITE_ENABLE_SITECONFIG_GETINTERPVAR
|
||||
|
||||
} elseif {$verbose} {
|
||||
send_user "\tSkip tests relying on an excepted siteconfig file installed\n"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user