Skip to content

Commit

Permalink
ts: tests do not fail anymore with Tcl 9.0b1
Browse files Browse the repository at this point in the history
  • Loading branch information
xdelaruelle committed Jan 13, 2024
1 parent 8e3a7b4 commit 5544d3d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 103 deletions.
109 changes: 15 additions & 94 deletions testsuite/modules.50-cmds/400-source-sh.exp
Original file line number Diff line number Diff line change
Expand Up @@ -355,14 +355,8 @@ setenv\t\tFOOSP {value }
setenv\t\tFOOWC va*ue
module-whatis\tsource-sh/1
-------------------------------------------------------------------"
# following tests are expected to fail with Tcl 9.0 (as of 9.0b1)
# similar stack trace than one reported at:
# https://core.tcl-lang.org/tcl/tktview/46dda6fc2904ee86cc45b3ddc14ce6fb6b4303e4
if {[cmpversion $tclsh_version 9.0] >= 0} {
testouterr_cmd sh {display source-sh/1} OK $tserr_disp1 xfail
} else {
testouterr_cmd sh {display source-sh/1} OK $tserr_disp1
}
testouterr_cmd sh {display source-sh/1} OK $tserr_disp1

set tserr_disp2 "-------------------------------------------------------------------
$mp/source-sh/4.3:

Expand Down Expand Up @@ -525,14 +519,7 @@ $warn_msgs: Unable to find ModulesTest in $mpre/source-sh/4.3.
$modlin"

# test 'display' sub-command when no module loaded
# following tests are expected to fail with Tcl 9.0 (as of 9.0b1)
# similar stack trace than one reported at:
# https://core.tcl-lang.org/tcl/tktview/46dda6fc2904ee86cc45b3ddc14ce6fb6b4303e4
if {[cmpversion $tclsh_version 9.0] >= 0} {
testouterr_cmd sh {display source-sh/1} OK $tserr_disp1 xfail
} else {
testouterr_cmd sh {display source-sh/1} OK $tserr_disp1
}
testouterr_cmd sh {display source-sh/1} OK $tserr_disp1
testouterr_cmd sh {display source-sh/4.3} ERR $tserr_disp2
set tserr_disp3 "-------------------------------------------------------------------
$mp/source-sh/5.0:
Expand Down Expand Up @@ -598,14 +585,7 @@ setenv FOOPATH /path/to/dir1:/path/to/dir2:/path/to/dir3
setenv FOOPATHDUP {/path/to/dir1:/path/to/dir1:/path/to/dir2:/path/to/dir1:/path/to/dir3:/path/to dir4:/path/to/dir3}
setenv FOOPATHDUPEM :/path/to/dir1:/path/to/dir1:/path/to/dir2:/path/to/dir1:/path/to/dir3::/path/to/dir3
-------------------------------------------------------------------"
# following tests are expected to fail with Tcl 9.0 (as of 9.0b1)
# similar stack trace than one reported at:
# https://core.tcl-lang.org/tcl/tktview/46dda6fc2904ee86cc45b3ddc14ce6fb6b4303e4
if {[cmpversion $tclsh_version 9.0] >= 0} {
testouterr_cmd sh {display source-sh/5.0} OK $tserr_disp3 xfail
} else {
testouterr_cmd sh {display source-sh/5.0} OK $tserr_disp3
}
testouterr_cmd sh {display source-sh/5.0} OK $tserr_disp3
set tserr_disp4 "-------------------------------------------------------------------
$mp/source-sh/5.1:

Expand Down Expand Up @@ -671,14 +651,7 @@ setenv FOOPATH /path/to/dir1:/path/to/dir2:/path/to/dir3
setenv FOOPATHDUP {/path/to/dir1:/path/to/dir1:/path/to/dir2:/path/to/dir1:/path/to/dir3:/path/to dir4:/path/to/dir3}
setenv FOOPATHDUPEM :/path/to/dir1:/path/to/dir1:/path/to/dir2:/path/to/dir1:/path/to/dir3::/path/to/dir3
-------------------------------------------------------------------"
# following tests are expected to fail with Tcl 9.0 (as of 9.0b1)
# similar stack trace than one reported at:
# https://core.tcl-lang.org/tcl/tktview/46dda6fc2904ee86cc45b3ddc14ce6fb6b4303e4
if {[cmpversion $tclsh_version 9.0] >= 0} {
testouterr_cmd sh {display source-sh/5.1} OK $tserr_disp4 xfail
} else {
testouterr_cmd sh {display source-sh/5.1} OK $tserr_disp4
}
testouterr_cmd sh {display source-sh/5.1} OK $tserr_disp4

#
# erroneous call or script
Expand Down Expand Up @@ -1045,14 +1018,7 @@ set-alias alunk {}
set-function funcunk {}
complete bash compunk {}
-------------------------------------------------------------------"
# following tests are expected to fail with Tcl 9.0 (as of 9.0b1)
# similar stack trace than one reported at:
# https://core.tcl-lang.org/tcl/tktview/46dda6fc2904ee86cc45b3ddc14ce6fb6b4303e4
if {[cmpversion $tclsh_version 9.0] >= 0} {
testouterr_cmd sh {display source-sh/5.0} OK $tserr_disp3 xfail
} else {
testouterr_cmd sh {display source-sh/5.0} OK $tserr_disp3
}
testouterr_cmd sh {display source-sh/5.0} OK $tserr_disp3

# clear source-sh details recorded in env yet module is still loaded
unsetenv_var __MODULES_LMSOURCESH
Expand Down Expand Up @@ -1207,16 +1173,8 @@ setenv\t\tFOOSP {value }
setenv\t\tFOOWC va*ue
module-whatis\tsource-sh/7.0
-------------------------------------------------------------------"
# following tests are expected to fail with Tcl 9.0 (as of 9.0b1)
# similar stack trace than one reported at:
# https://core.tcl-lang.org/tcl/tktview/46dda6fc2904ee86cc45b3ddc14ce6fb6b4303e4
if {[cmpversion $tclsh_version 9.0] >= 0} {
testouterr_cmd sh {display source-sh/7.0} OK $tserr_disp70 xfail
testouterr_cmd tcsh {display source-sh/7.0} OK $tserr_disp70 xfail
} else {
testouterr_cmd sh {display source-sh/7.0} OK $tserr_disp70
testouterr_cmd tcsh {display source-sh/7.0} OK $tserr_disp70
}
testouterr_cmd sh {display source-sh/7.0} OK $tserr_disp70
testouterr_cmd tcsh {display source-sh/7.0} OK $tserr_disp70

setenv_loaded_module [list source-sh/7.0] [list $mp/source-sh/7.0]
setenv_var __MODULES_LMREFRESH source-sh/7.0
Expand Down Expand Up @@ -1256,14 +1214,7 @@ lappend ans [list out {complete othercmd 'n/--help/n/';}]
lappend ans [list out {complete mycmd 'n/help/`_module_avail`/' 'n/add/`_module_not_yet_loaded; echo "--auto --no-auto --force -f --icase -i --tag --tag="`/';}]
testouterr_cmd tcsh {refresh} $ans {}

# following tests are expected to fail with Tcl 9.0 (as of 9.0b1)
# similar stack trace than one reported at:
# https://core.tcl-lang.org/tcl/tktview/46dda6fc2904ee86cc45b3ddc14ce6fb6b4303e4
if {[cmpversion $tclsh_version 9.0] >= 0} {
testouterr_cmd tcsh {display source-sh/7.0} OK $tserr_disp70 xfail
} else {
testouterr_cmd tcsh {display source-sh/7.0} OK $tserr_disp70
}
testouterr_cmd tcsh {display source-sh/7.0} OK $tserr_disp70

unsetenv_loaded_module
unsetenv_var __MODULES_LMREFRESH
Expand Down Expand Up @@ -1343,16 +1294,8 @@ setenv\t\tFOOSP {value }
setenv\t\tFOOWC va*ue
module-whatis\tsource-sh/7.1
-------------------------------------------------------------------"
# following tests are expected to fail with Tcl 9.0 (as of 9.0b1)
# similar stack trace than one reported at:
# https://core.tcl-lang.org/tcl/tktview/46dda6fc2904ee86cc45b3ddc14ce6fb6b4303e4
if {[cmpversion $tclsh_version 9.0] >= 0} {
testouterr_cmd sh {display source-sh/7.1} OK $tserr_disp71 xfail
testouterr_cmd bash {display source-sh/7.1} OK $tserr_disp71 xfail
} else {
testouterr_cmd sh {display source-sh/7.1} OK $tserr_disp71
testouterr_cmd bash {display source-sh/7.1} OK $tserr_disp71
}
testouterr_cmd sh {display source-sh/7.1} OK $tserr_disp71
testouterr_cmd bash {display source-sh/7.1} OK $tserr_disp71

setenv_loaded_module [list source-sh/7.1] [list $mp/source-sh/7.1]
setenv_var __MODULES_LMREFRESH source-sh/7.1
Expand Down Expand Up @@ -1405,14 +1348,7 @@ lappend ans [list out {complete -u othercmd;}]
lappend ans [list out {complete -j -P '"%' -S '"' mycmd;}]
testouterr_cmd bash {refresh} $ans {}

# following tests are expected to fail with Tcl 9.0 (as of 9.0b1)
# similar stack trace than one reported at:
# https://core.tcl-lang.org/tcl/tktview/46dda6fc2904ee86cc45b3ddc14ce6fb6b4303e4
if {[cmpversion $tclsh_version 9.0] >= 0} {
testouterr_cmd bash {display source-sh/7.1} OK $tserr_disp71 xfail
} else {
testouterr_cmd bash {display source-sh/7.1} OK $tserr_disp71
}
testouterr_cmd bash {display source-sh/7.1} OK $tserr_disp71

unsetenv_loaded_module
unsetenv_var __MODULES_LMREFRESH
Expand Down Expand Up @@ -1528,16 +1464,8 @@ setenv\t\tFOOWC va*ue
module-whatis\tsource-sh/7.2
-------------------------------------------------------------------"
}
# following tests are expected to fail with Tcl 9.0 (as of 9.0b1)
# similar stack trace than one reported at:
# https://core.tcl-lang.org/tcl/tktview/46dda6fc2904ee86cc45b3ddc14ce6fb6b4303e4
if {[cmpversion $tclsh_version 9.0] >= 0} {
testouterr_cmd sh {display source-sh/7.2} OK $tserr_disp72 xfail
testouterr_cmd fish {display source-sh/7.2} OK $tserr_disp72 xfail
} else {
testouterr_cmd sh {display source-sh/7.2} OK $tserr_disp72
testouterr_cmd fish {display source-sh/7.2} OK $tserr_disp72
}
testouterr_cmd sh {display source-sh/7.2} OK $tserr_disp72
testouterr_cmd fish {display source-sh/7.2} OK $tserr_disp72

setenv_loaded_module [list source-sh/7.2] [list $mp/source-sh/7.2]
setenv_var __MODULES_LMREFRESH source-sh/7.2
Expand Down Expand Up @@ -1651,14 +1579,7 @@ module-whatis\tsource-sh/7.2
-------------------------------------------------------------------"
}
if {!$is_modules_defined_fish} {
# following tests are expected to fail with Tcl 9.0 (as of 9.0b1)
# similar stack trace than one reported at:
# https://core.tcl-lang.org/tcl/tktview/46dda6fc2904ee86cc45b3ddc14ce6fb6b4303e4
if {[cmpversion $tclsh_version 9.0] >= 0} {
testouterr_cmd fish {display source-sh/7.2} OK $tserr_disp72 xfail
} else {
testouterr_cmd fish {display source-sh/7.2} OK $tserr_disp72
}
testouterr_cmd fish {display source-sh/7.2} OK $tserr_disp72
}

unsetenv_loaded_module
Expand Down
11 changes: 2 additions & 9 deletions testsuite/modules.70-maint/410-timer.exp
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,8 @@ set tserr "($timer_msgs .* \\\(\\d+.\\d+ ms\\\))*
($timer_msgs .* \\\(\\d+.\\d+ ms\\\))*

$total_timer"
# following tests are expected to fail with Tcl 9.0 (as of 9.0b1)
# see https://core.tcl-lang.org/tcl/tktview/46dda6fc2904ee86cc45b3ddc14ce6fb6b4303e4
if {[cmpversion $tclsh_version 9.0] >= 0} {
testouterr_cmd_re sh {load foo/1.0 --debug --timer} $ans $tserr 0 xfail
testouterr_cmd_re sh {load foo/1.0 --debug --timer --debug} $ans $tserr 0 xfail
} else {
testouterr_cmd_re sh {load foo/1.0 --debug --timer} $ans $tserr
testouterr_cmd_re sh {load foo/1.0 --debug --timer --debug} $ans $tserr
}
testouterr_cmd_re sh {load foo/1.0 --debug --timer} $ans $tserr
testouterr_cmd_re sh {load foo/1.0 --debug --timer --debug} $ans $tserr

set tserr "($timer_msgs .* \\\(\\d+.\\d+ ms\\\))*
$no_loaded
Expand Down

0 comments on commit 5544d3d

Please sign in to comment.