Skip to content

Commit

Permalink
gh: update Tcl9 test case to 9.0b2rc2
Browse files Browse the repository at this point in the history
One regression spotted when mixing eval + clock + error within condition
block. Issue has been reported upstream [1]

[1] https://core.tcl-lang.org/tcl/tktview/9889f96f4d
  • Loading branch information
xdelaruelle committed May 13, 2024
1 parent 00c9593 commit 364f842
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 14 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/linux_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -363,9 +363,9 @@ jobs:
# libtclenvmodules build requirements
sudo apt-get install -y gcc autoconf
# manually install tcl9.0
curl -L --output tcl9.0b1-src.tar.gz http://downloads.sourceforge.net/tcl/tcl9.0b1-src.tar.gz
tar xfz tcl9.0b1-src.tar.gz
cd tcl9.0b1/unix
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
cd tcl9.0b2/unix
./configure
make -j
sudo make install
Expand Down
1 change: 1 addition & 0 deletions .hunspell.en.dic
Original file line number Diff line number Diff line change
Expand Up @@ -1161,3 +1161,4 @@ Déchard
getgrouplist
getgroups
gcov
Tcl9
88 changes: 77 additions & 11 deletions testsuite/modules.50-cmds/440-module-tag.exp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,13 @@ 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]
testouterr_cmd sh {load tag/5.0} $ans $tserr
# 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
}
unsetenv_var TESTSUITE_MODULE_TAG_ERR1

setenv_var TESTSUITE_MODULE_TAG_ERR2 1
Expand All @@ -62,7 +68,13 @@ 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]
testouterr_cmd sh {load tag/5.0} $ans $tserr
# 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
}
unsetenv_var TESTSUITE_MODULE_TAG_ERR2

setenv_var TESTSUITE_MODULE_TAG_ERR3 1
Expand All @@ -78,7 +90,13 @@ 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]]]
testouterr_cmd_re sh {load tag/5.0} $ans $tserr
# 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
}
unsetenv_var TESTSUITE_MODULE_TAG_ERR3

setenv_var TESTSUITE_MODULE_TAG_ERR4 1
Expand All @@ -94,7 +112,13 @@ 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]]]
testouterr_cmd_re sh {load tag/5.0} $ans $tserr
# 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
}
unsetenv_var TESTSUITE_MODULE_TAG_ERR4

setenv_var TESTSUITE_MODULE_TAG_ERR5 1
Expand All @@ -110,7 +134,13 @@ 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]]]
testouterr_cmd_re sh {load tag/5.0} $ans $tserr
# 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
}
unsetenv_var TESTSUITE_MODULE_TAG_ERR5

# same error rendering than module-tag/module-forbid, so rely on tests made for
Expand All @@ -130,7 +160,13 @@ 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]
testouterr_cmd sh {load tag/5.0} $ans $tserr
# 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
}
unsetenv_var TESTSUITE_MODULE_TAG_ERR6

setenv_var TESTSUITE_MODULE_TAG_ERR7 1
Expand All @@ -146,7 +182,13 @@ 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]
testouterr_cmd sh {load tag/5.0} $ans $tserr
# 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
}
unsetenv_var TESTSUITE_MODULE_TAG_ERR7

setenv_var TESTSUITE_MODULE_TAG_ERR8 1
Expand All @@ -162,7 +204,13 @@ 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]
testouterr_cmd sh {load tag/5.0} $ans $tserr
# 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
}
unsetenv_var TESTSUITE_MODULE_TAG_ERR8

setenv_var TESTSUITE_MODULE_TAG_ERR9 1
Expand All @@ -178,7 +226,13 @@ 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]
testouterr_cmd sh {load tag/5.0} $ans $tserr
# 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
}
unsetenv_var TESTSUITE_MODULE_TAG_ERR9

setenv_var TESTSUITE_MODULE_TAG_ERR10 1
Expand All @@ -194,7 +248,13 @@ 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]
testouterr_cmd sh {load tag/5.0} $ans $tserr
# 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
}
unsetenv_var TESTSUITE_MODULE_TAG_ERR10

setenv_var TESTSUITE_MODULE_TAG_ERR11 1
Expand All @@ -210,7 +270,13 @@ 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]
testouterr_cmd sh {load tag/5.0} $ans $tserr
# 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
}
unsetenv_var TESTSUITE_MODULE_TAG_ERR11

#
Expand Down

0 comments on commit 364f842

Please sign in to comment.