mirror of
https://github.com/envmodules/modules.git
synced 2026-05-30 00:12:31 +08:00
ts: fix --return-value tests for Tcl8.5 in 50/{260,472}
This commit is contained in:
@@ -76,25 +76,28 @@ testouterr_cmd_re "sh" "display $module" "OK" "$modlin\n$modulefilere:\n\nsetenv
|
||||
#
|
||||
|
||||
setenv_var TESTSUITE_GETENV toomany1
|
||||
set tserr [msg_load $module [msg_moderr {wrong # args: should be "getenv ?--return-value? variable ?valifundef?"} {getenv TEST {} other} $modulefile 33]]
|
||||
testouterr_cmd sh "load $module" ERR $tserr
|
||||
set ln [expr {[cmpversion $tclsh_version 8.5] < 1 ? {30} : {33}}]
|
||||
set tserr [escre [msg_load $module [msg_moderr {wrong # args: should be "getenv ?--return-value? variable ?valifundef?"} {getenv TEST {} other<EXM>} $modulefile $ln]]]
|
||||
testouterr_cmd_re sh "load $module" ERR $tserr
|
||||
|
||||
set tserr "$modlin
|
||||
$modulefilere:
|
||||
|
||||
setenv\\s*testsuite\\s*\\\$TEST
|
||||
setenv\\s*testsuite2\\s*\\\$TEST2
|
||||
[escre [msg_moderr {wrong # args: should be "getenv ?--return-value? variable ?valifundef?"} {getenv TEST {} other} $modulefile 33 { }]]
|
||||
[escre [msg_moderr {wrong # args: should be "getenv ?--return-value? variable ?valifundef?"} {getenv TEST {} other<EXM>} $modulefile $ln { }]]
|
||||
$modlin"
|
||||
testouterr_cmd_re sh "display $module" ERR $tserr
|
||||
|
||||
setenv_var TESTSUITE_GETENV toomany2
|
||||
set tserr [msg_load $module [msg_moderr {wrong # args: should be "getenv ?--return-value? variable ?valifundef?"} {getenv --return-value TEST {} other} $modulefile 36]]
|
||||
testouterr_cmd sh "load $module" ERR $tserr
|
||||
set ln [expr {[cmpversion $tclsh_version 8.5] < 1 ? {30} : {36}}]
|
||||
set tserr [escre [msg_load $module [msg_moderr {wrong # args: should be "getenv ?--return-value? variable ?valifundef?"} {getenv --return-value TEST {} other<EXM>} $modulefile $ln]]]
|
||||
testouterr_cmd_re sh "load $module" ERR $tserr
|
||||
|
||||
setenv_var TESTSUITE_GETENV toofew1
|
||||
set tserr [msg_load $module [msg_moderr {wrong # args: should be "getenv ?--return-value? variable ?valifundef?"} {getenv} $modulefile 39]]
|
||||
testouterr_cmd sh "load $module" ERR $tserr
|
||||
set ln [expr {[cmpversion $tclsh_version 8.5] < 1 ? {30} : {39}}]
|
||||
set tserr [escre [msg_load $module [msg_moderr {wrong # args: should be "getenv ?--return-value? variable ?valifundef?"} {getenv<EXM>} $modulefile $ln]]]
|
||||
testouterr_cmd_re sh "load $module" ERR $tserr
|
||||
|
||||
setenv_var TESTSUITE_GETENV toofew2
|
||||
set ans [list]
|
||||
@@ -116,8 +119,9 @@ lappend ans [list set testsuite {}]
|
||||
testouterr_cmd sh "load $module" $ans {}
|
||||
|
||||
setenv_var TESTSUITE_GETENV misplaced2
|
||||
set tserr [msg_load $module [msg_moderr {wrong # args: should be "getenv ?--return-value? variable ?valifundef?"} {getenv TEST foo --return-value} $modulefile 48]]
|
||||
testouterr_cmd sh "load $module" ERR $tserr
|
||||
set ln [expr {[cmpversion $tclsh_version 8.5] < 1 ? {30} : {48}}]
|
||||
set tserr [escre [msg_load $module [msg_moderr {wrong # args: should be "getenv ?--return-value? variable ?valifundef?"} {getenv TEST foo --return-value<EXM>} $modulefile $ln]]]
|
||||
testouterr_cmd_re sh "load $module" ERR $tserr
|
||||
|
||||
setenv_var TESTSUITE_GETENV return1
|
||||
set ans [list]
|
||||
|
||||
@@ -182,38 +182,41 @@ set modulefile $mp/$module
|
||||
set modulefilere $mpre/$module
|
||||
|
||||
setenv_var TESTSUITE_GETVARIANT toomany1
|
||||
set tserr [msg_load $module{foo=val1} [msg_moderr {wrong # args: should be "getvariant ?--return-value? name ?valifundef?"} {getvariant foo {} other} $modulefile 10]]
|
||||
testouterr_cmd sh "load $module foo=val1" ERR $tserr
|
||||
set ln [expr {[cmpversion $tclsh_version 8.5] < 1 ? {7} : {10}}]
|
||||
set tserr [escre [msg_load $module{foo=val1} [msg_moderr {wrong # args: should be "getvariant ?--return-value? name ?valifundef?"} {getvariant foo {} other<EXM>} $modulefile $ln]]]
|
||||
testouterr_cmd_re sh "load $module foo=val1" ERR $tserr
|
||||
|
||||
set tserr "$modlin
|
||||
$modulefilere:
|
||||
|
||||
variant\\s*foo\\s*val1 val2 val3
|
||||
[escre [msg_moderr {wrong # args: should be "getvariant ?--return-value? name ?valifundef?"} {getvariant foo {} other} $modulefile 10 { }]]
|
||||
[escre [msg_moderr {wrong # args: should be "getvariant ?--return-value? name ?valifundef?"} {getvariant foo {} other<EXM>} $modulefile $ln { }]]
|
||||
$modlin"
|
||||
testouterr_cmd_re sh "display $module foo=val1" ERR $tserr
|
||||
|
||||
setenv_var TESTSUITE_GETVARIANT toomany2
|
||||
set tserr [msg_load $module{foo=val1} [msg_moderr {wrong # args: should be "getvariant ?--return-value? name ?valifundef?"} {getvariant --return-value foo {} other} $modulefile 13]]
|
||||
testouterr_cmd sh "load $module foo=val1" ERR $tserr
|
||||
set ln [expr {[cmpversion $tclsh_version 8.5] < 1 ? {7} : {13}}]
|
||||
set tserr [escre [msg_load $module{foo=val1} [msg_moderr {wrong # args: should be "getvariant ?--return-value? name ?valifundef?"} {getvariant --return-value foo {} other<EXM>} $modulefile $ln]]]
|
||||
testouterr_cmd_re sh "load $module foo=val1" ERR $tserr
|
||||
|
||||
set tserr "$modlin
|
||||
$modulefilere:
|
||||
|
||||
variant\\s*foo\\s*val1 val2 val3
|
||||
[escre [msg_moderr {wrong # args: should be "getvariant ?--return-value? name ?valifundef?"} {getvariant --return-value foo {} other} $modulefile 13 { }]]
|
||||
[escre [msg_moderr {wrong # args: should be "getvariant ?--return-value? name ?valifundef?"} {getvariant --return-value foo {} other<EXM>} $modulefile $ln { }]]
|
||||
$modlin"
|
||||
testouterr_cmd_re sh "display $module foo=val1" ERR $tserr
|
||||
|
||||
setenv_var TESTSUITE_GETVARIANT toofew1
|
||||
set tserr [msg_load $module{foo=val1} [msg_moderr {wrong # args: should be "getvariant ?--return-value? name ?valifundef?"} {getvariant} $modulefile 16]]
|
||||
testouterr_cmd sh "load $module foo=val1" ERR $tserr
|
||||
set ln [expr {[cmpversion $tclsh_version 8.5] < 1 ? {7} : {16}}]
|
||||
set tserr [escre [msg_load $module{foo=val1} [msg_moderr {wrong # args: should be "getvariant ?--return-value? name ?valifundef?"} {getvariant<EXM>} $modulefile $ln]]]
|
||||
testouterr_cmd_re sh "load $module foo=val1" ERR $tserr
|
||||
|
||||
set tserr "$modlin
|
||||
$modulefilere:
|
||||
|
||||
variant\\s*foo\\s*val1 val2 val3
|
||||
[escre [msg_moderr {wrong # args: should be "getvariant ?--return-value? name ?valifundef?"} {getvariant} $modulefile 16 { }]]
|
||||
[escre [msg_moderr {wrong # args: should be "getvariant ?--return-value? name ?valifundef?"} {getvariant<EXM>} $modulefile $ln { }]]
|
||||
$modlin"
|
||||
testouterr_cmd_re sh "display $module foo=val1" ERR $tserr
|
||||
|
||||
@@ -250,14 +253,15 @@ $modlin"
|
||||
testouterr_cmd_re sh "display $module foo=val1" OK $tserr
|
||||
|
||||
setenv_var TESTSUITE_GETVARIANT misplaced2
|
||||
set tserr [msg_load $module{foo=val1} [msg_moderr {wrong # args: should be "getvariant ?--return-value? name ?valifundef?"} {getvariant foo bar --return-value} $modulefile 25]]
|
||||
testouterr_cmd sh "load $module foo=val1" ERR $tserr
|
||||
set ln [expr {[cmpversion $tclsh_version 8.5] < 1 ? {7} : {25}}]
|
||||
set tserr [escre [msg_load $module{foo=val1} [msg_moderr {wrong # args: should be "getvariant ?--return-value? name ?valifundef?"} {getvariant foo bar --return-value<EXM>} $modulefile $ln]]]
|
||||
testouterr_cmd_re sh "load $module foo=val1" ERR $tserr
|
||||
|
||||
set tserr "$modlin
|
||||
$modulefilere:
|
||||
|
||||
variant\\s*foo\\s*val1 val2 val3
|
||||
[escre [msg_moderr {wrong # args: should be "getvariant ?--return-value? name ?valifundef?"} {getvariant foo bar --return-value} $modulefile 25 { }]]
|
||||
[escre [msg_moderr {wrong # args: should be "getvariant ?--return-value? name ?valifundef?"} {getvariant foo bar --return-value<EXM>} $modulefile $ln { }]]
|
||||
$modlin"
|
||||
testouterr_cmd_re sh "display $module foo=val1" ERR $tserr
|
||||
|
||||
|
||||
Reference in New Issue
Block a user