Skip to content

Commit f22617b

Browse files
committed
ts: improve replaceFirstInStr proc coverage
Signed-off-by: Xavier Delaruelle <xavier.delaruelle@cea.fr>
1 parent 1f3b304 commit f22617b

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

testsuite/example/siteconfig.tcl-1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -711,4 +711,8 @@ if {[info exists env(TESTSUITE_ENABLE_SITECONFIG_GETVIAMODULEMODULEPATH)]} {
711711
report [string length [getViaModuleModulepath unk]]
712712
}
713713

714+
if {[info exists env(TESTSUITE_ENABLE_SITECONFIG_REPLACEFIRSTINSTR)]} {
715+
report [replaceFirstInStr string unk foo]
716+
}
717+
714718
}

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -829,6 +829,13 @@ lappend ans $vers_reportre
829829
testouterr_cmd_re sh -V OK [join $ans \n]
830830
unsetenv_var TESTSUITE_ENABLE_SITECONFIG_GETVIAMODULEMODULEPATH
831831

832+
setenv_var TESTSUITE_ENABLE_SITECONFIG_REPLACEFIRSTINSTR 1
833+
set ans [list]
834+
lappend ans string
835+
lappend ans $vers_reportre
836+
testouterr_cmd_re sh -V OK [join $ans \n]
837+
unsetenv_var TESTSUITE_ENABLE_SITECONFIG_REPLACEFIRSTINSTR
838+
832839
} elseif {$verbose} {
833840
send_user "\tSkip tests relying on an excepted siteconfig file installed\n"
834841
}

0 commit comments

Comments
 (0)