Skip to content

Commit

Permalink
gh: update Tcl9 test case to 9.0b2
Browse files Browse the repository at this point in the history
Issue found on Tcl 9.0b2rc2 and reported at [1] has been worked around.

[1] https://core.tcl-lang.org/tcl/tktview/9889f96f4d
  • Loading branch information
xdelaruelle committed May 21, 2024
1 parent 364f842 commit 24fecc4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 79 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/linux_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,8 @@ jobs:
# libtclenvmodules build requirements
sudo apt-get install -y gcc autoconf
# manually install tcl9.0
curl -L --output tcl9.0b2rc2-src.tar.gz http://downloads.sourceforge.net/tcl/tcl9.0b2rc2-src.tar.gz
tar xfz tcl9.0b2rc2-src.tar.gz
curl -L --output tcl9.0b2-src.tar.gz http://downloads.sourceforge.net/tcl/tcl9.0b2-src.tar.gz
tar xfz tcl9.0b2-src.tar.gz
cd tcl9.0b2/unix
./configure
make -j
Expand Down
88 changes: 11 additions & 77 deletions testsuite/modules.50-cmds/440-module-tag.exp
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,7 @@ if {[cmpversion $tclsh_version 8.6] == -1} {
set linenum 14
}
set tserr [msg_moderr {No tag specified in argument} {module-tag} $mp/tag/.modulerc $linenum { } {} {} $custom]
# following tests are expected to fail with Tcl 9.0 (as of 9.0b2rc2)
# see https://core.tcl-lang.org/tcl/tktview/9889f96f4d
if {[cmpversion $tclsh_version 9.0] >= 0} {
testouterr_cmd sh {load tag/5.0} $ans $tserr xfail
} else {
testouterr_cmd sh {load tag/5.0} $ans $tserr
}
testouterr_cmd sh {load tag/5.0} $ans $tserr
unsetenv_var TESTSUITE_MODULE_TAG_ERR1

setenv_var TESTSUITE_MODULE_TAG_ERR2 1
Expand All @@ -68,13 +62,7 @@ if {[cmpversion $tclsh_version 8.6] == -1} {
set linenum 17
}
set tserr [msg_moderr {No module specified in argument} {module-tag foo} $mp/tag/.modulerc $linenum { } {} {} $custom]
# following tests are expected to fail with Tcl 9.0 (as of 9.0b2rc2)
# see https://core.tcl-lang.org/tcl/tktview/9889f96f4d
if {[cmpversion $tclsh_version 9.0] >= 0} {
testouterr_cmd sh {load tag/5.0} $ans $tserr xfail
} else {
testouterr_cmd sh {load tag/5.0} $ans $tserr
}
testouterr_cmd sh {load tag/5.0} $ans $tserr
unsetenv_var TESTSUITE_MODULE_TAG_ERR2

setenv_var TESTSUITE_MODULE_TAG_ERR3 1
Expand All @@ -90,13 +78,7 @@ if {[cmpversion $tclsh_version 8.6] == -1} {
set linenum 20
}
set tserr [string map {<EXTMATCH> (.*)+} [escre [msg_moderr {Invalid option '--foo'} $errmsg $mp/tag/.modulerc $linenum { } {} {} $custom]]]
# following tests are expected to fail with Tcl 9.0 (as of 9.0b2rc2)
# see https://core.tcl-lang.org/tcl/tktview/9889f96f4d
if {[cmpversion $tclsh_version 9.0] >= 0} {
testouterr_cmd_re sh {load tag/5.0} $ans $tserr 0 xfail
} else {
testouterr_cmd_re sh {load tag/5.0} $ans $tserr
}
testouterr_cmd_re sh {load tag/5.0} $ans $tserr
unsetenv_var TESTSUITE_MODULE_TAG_ERR3

setenv_var TESTSUITE_MODULE_TAG_ERR4 1
Expand All @@ -112,13 +94,7 @@ if {[cmpversion $tclsh_version 8.6] == -1} {
set linenum 23
}
set tserr [string map {<EXTMATCH> (.*)+} [escre [msg_moderr {Invalid option '--before'} $errmsg $mp/tag/.modulerc $linenum { } {} {} $custom]]]
# following tests are expected to fail with Tcl 9.0 (as of 9.0b2rc2)
# see https://core.tcl-lang.org/tcl/tktview/9889f96f4d
if {[cmpversion $tclsh_version 9.0] >= 0} {
testouterr_cmd_re sh {load tag/5.0} $ans $tserr 0 xfail
} else {
testouterr_cmd_re sh {load tag/5.0} $ans $tserr
}
testouterr_cmd_re sh {load tag/5.0} $ans $tserr
unsetenv_var TESTSUITE_MODULE_TAG_ERR4

setenv_var TESTSUITE_MODULE_TAG_ERR5 1
Expand All @@ -134,13 +110,7 @@ if {[cmpversion $tclsh_version 8.6] == -1} {
set linenum 26
}
set tserr [string map {<EXTMATCH> (.*)+} [escre [msg_moderr {Invalid option '--after'} $errmsg $mp/tag/.modulerc $linenum { } {} {} $custom]]]
# following tests are expected to fail with Tcl 9.0 (as of 9.0b2rc2)
# see https://core.tcl-lang.org/tcl/tktview/9889f96f4d
if {[cmpversion $tclsh_version 9.0] >= 0} {
testouterr_cmd_re sh {load tag/5.0} $ans $tserr 0 xfail
} else {
testouterr_cmd_re sh {load tag/5.0} $ans $tserr
}
testouterr_cmd_re sh {load tag/5.0} $ans $tserr
unsetenv_var TESTSUITE_MODULE_TAG_ERR5

# same error rendering than module-tag/module-forbid, so rely on tests made for
Expand All @@ -160,13 +130,7 @@ if {[cmpversion $tclsh_version 8.6] == -1} {
set linenum 29
}
set tserr [msg_moderr {'loaded' is a reserved tag name and cannot be set} $errmsg $mp/tag/.modulerc $linenum { } {} {} $custom]
# following tests are expected to fail with Tcl 9.0 (as of 9.0b2rc2)
# see https://core.tcl-lang.org/tcl/tktview/9889f96f4d
if {[cmpversion $tclsh_version 9.0] >= 0} {
testouterr_cmd sh {load tag/5.0} $ans $tserr xfail
} else {
testouterr_cmd sh {load tag/5.0} $ans $tserr
}
testouterr_cmd sh {load tag/5.0} $ans $tserr
unsetenv_var TESTSUITE_MODULE_TAG_ERR6

setenv_var TESTSUITE_MODULE_TAG_ERR7 1
Expand All @@ -182,13 +146,7 @@ if {[cmpversion $tclsh_version 8.6] == -1} {
set linenum 32
}
set tserr [msg_moderr {'auto-loaded' is a reserved tag name and cannot be set} $errmsg $mp/tag/.modulerc $linenum { } {} {} $custom]
# following tests are expected to fail with Tcl 9.0 (as of 9.0b2rc2)
# see https://core.tcl-lang.org/tcl/tktview/9889f96f4d
if {[cmpversion $tclsh_version 9.0] >= 0} {
testouterr_cmd sh {load tag/5.0} $ans $tserr xfail
} else {
testouterr_cmd sh {load tag/5.0} $ans $tserr
}
testouterr_cmd sh {load tag/5.0} $ans $tserr
unsetenv_var TESTSUITE_MODULE_TAG_ERR7

setenv_var TESTSUITE_MODULE_TAG_ERR8 1
Expand All @@ -204,13 +162,7 @@ if {[cmpversion $tclsh_version 8.6] == -1} {
set linenum 35
}
set tserr [msg_moderr {'forbidden' is a reserved tag name and cannot be set} $errmsg $mp/tag/.modulerc $linenum { } {} {} $custom]
# following tests are expected to fail with Tcl 9.0 (as of 9.0b2rc2)
# see https://core.tcl-lang.org/tcl/tktview/9889f96f4d
if {[cmpversion $tclsh_version 9.0] >= 0} {
testouterr_cmd sh {load tag/5.0} $ans $tserr xfail
} else {
testouterr_cmd sh {load tag/5.0} $ans $tserr
}
testouterr_cmd sh {load tag/5.0} $ans $tserr
unsetenv_var TESTSUITE_MODULE_TAG_ERR8

setenv_var TESTSUITE_MODULE_TAG_ERR9 1
Expand All @@ -226,13 +178,7 @@ if {[cmpversion $tclsh_version 8.6] == -1} {
set linenum 38
}
set tserr [msg_moderr {'nearly-forbidden' is a reserved tag name and cannot be set} $errmsg $mp/tag/.modulerc $linenum { } {} {} $custom]
# following tests are expected to fail with Tcl 9.0 (as of 9.0b2rc2)
# see https://core.tcl-lang.org/tcl/tktview/9889f96f4d
if {[cmpversion $tclsh_version 9.0] >= 0} {
testouterr_cmd sh {load tag/5.0} $ans $tserr xfail
} else {
testouterr_cmd sh {load tag/5.0} $ans $tserr
}
testouterr_cmd sh {load tag/5.0} $ans $tserr
unsetenv_var TESTSUITE_MODULE_TAG_ERR9

setenv_var TESTSUITE_MODULE_TAG_ERR10 1
Expand All @@ -248,13 +194,7 @@ if {[cmpversion $tclsh_version 8.6] == -1} {
set linenum 41
}
set tserr [msg_moderr {'hidden' is a reserved tag name and cannot be set} $errmsg $mp/tag/.modulerc $linenum { } {} {} $custom]
# following tests are expected to fail with Tcl 9.0 (as of 9.0b2rc2)
# see https://core.tcl-lang.org/tcl/tktview/9889f96f4d
if {[cmpversion $tclsh_version 9.0] >= 0} {
testouterr_cmd sh {load tag/5.0} $ans $tserr xfail
} else {
testouterr_cmd sh {load tag/5.0} $ans $tserr
}
testouterr_cmd sh {load tag/5.0} $ans $tserr
unsetenv_var TESTSUITE_MODULE_TAG_ERR10

setenv_var TESTSUITE_MODULE_TAG_ERR11 1
Expand All @@ -270,13 +210,7 @@ if {[cmpversion $tclsh_version 8.6] == -1} {
set linenum 44
}
set tserr [msg_moderr {'hidden-loaded' is a reserved tag name and cannot be set} $errmsg $mp/tag/.modulerc $linenum { } {} {} $custom]
# following tests are expected to fail with Tcl 9.0 (as of 9.0b2rc2)
# see https://core.tcl-lang.org/tcl/tktview/9889f96f4d
if {[cmpversion $tclsh_version 9.0] >= 0} {
testouterr_cmd sh {load tag/5.0} $ans $tserr xfail
} else {
testouterr_cmd sh {load tag/5.0} $ans $tserr
}
testouterr_cmd sh {load tag/5.0} $ans $tserr
unsetenv_var TESTSUITE_MODULE_TAG_ERR11

#
Expand Down

0 comments on commit 24fecc4

Please sign in to comment.