ts: add test to improve getInterpVar proc coverage

This commit is contained in:
Xavier Delaruelle
2024-01-14 08:00:29 +01:00
parent 69f1f15c99
commit acfb4f24c5
2 changed files with 18 additions and 0 deletions

View File

@@ -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
}
}

View File

@@ -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"
}