140-color.exp (modules-5.1.1.tar.bz2) | : | 140-color.exp (modules-5.2.0.tar.bz2) | ||
---|---|---|---|---|
skipping to change at line 337 | skipping to change at line 337 | |||
setenv_var MODULES_TERM_BACKGROUND dark | setenv_var MODULES_TERM_BACKGROUND dark | |||
background_test_case dark | background_test_case dark | |||
setenv_var MODULES_TERM_BACKGROUND light | setenv_var MODULES_TERM_BACKGROUND light | |||
background_test_case light | background_test_case light | |||
unsetenv_var MODULES_TERM_BACKGROUND | unsetenv_var MODULES_TERM_BACKGROUND | |||
# also if it happen during first execution steps | # also if it happen during first execution steps | |||
if {[siteconfig_isStderrTty]} { | if {[siteconfig_isStderrTty]} { | |||
setenv_var TESTSUITE_ENABLE_SITECONFIG_BROKEN 1 | setenv_var TESTSUITE_ENABLE_SITECONFIG_BROKEN 1 | |||
set tserr [list] | set tserr [escre "$error_msgs: Site configuration source failed | |||
lappend tserr "$error_msgs: Site configuration source failed" | invalid command name \"unk_foo\" | |||
lappend tserr { invalid command name "unk_foo"} | while executing | |||
lappend tserr { while executing} | \"unk_foo<EXM>\" | |||
lappend tserr { "unk_foo"} | (file \"$siteconfig_file\" line 2)<EXM>"] | |||
lappend tserr " invoked from within | colorset_test_case {--color -V} [list er $error_msgs] $tserr | |||
\"if {\\\[info exists env\\(TESTSUITE_ENABLE_SITECONFIG\\)\\\]} \{ | ||||
# force stderr terminal attachment state | ||||
proc initStateIsStderrTty {} { | ||||
return 1 | ||||
} | ||||
# enable...\" | ||||
\\(file \"$siteconfig_file\" line 2\\)" | ||||
if {[info exists env(COVERAGE)]} { | ||||
lappend tserr " invoked from within | ||||
\"::_instrument_::source $siteconfig_file\" | ||||
\\(\"uplevel\" body line 1\\) | ||||
invoked from within | ||||
\"uplevel 1 \\\$args\" | ||||
\\(procedure \"source\" line 16\\) | ||||
\\(file \"$siteconfig_file\"\\)" | ||||
} | ||||
colorset_test_case {--color -V} [list er $error_msgs] [join $tserr \n] | ||||
unsetenv_var TESTSUITE_ENABLE_SITECONFIG_BROKEN | unsetenv_var TESTSUITE_ENABLE_SITECONFIG_BROKEN | |||
} | } | |||
# test of the various element on all commands that can produce a colored output | # test of the various element on all commands that can produce a colored output | |||
unsetenv_var MODULES_COLOR | unsetenv_var MODULES_COLOR | |||
unsetenv_var MODULES_COLORS | unsetenv_var MODULES_COLORS | |||
# warning (wa) | # warning (wa) | |||
colorset_test_case {--color --create -V} [list wa WARNING] {WARNING: Unsupported option '--create'.*} | colorset_test_case {--color --create -V} [list wa WARNING] {WARNING: Unsupported option '--create'.*} | |||
# ensure command-line switch position has no impact | # ensure command-line switch position has no impact | |||
skipping to change at line 467 | skipping to change at line 448 | |||
colorset_test_case {list} [list se : se \\( se \\) sy new sy cur sy stable de lo c_rc6/1.2] ".*loc_tr/1.0\\(cur:stable\\).*loc_rc6/1.2\\(new\\).*" 1 | colorset_test_case {list} [list se : se \\( se \\) sy new sy cur sy stable de lo c_rc6/1.2] ".*loc_tr/1.0\\(cur:stable\\).*loc_rc6/1.2\\(new\\).*" 1 | |||
colorset_test_case {list -l} [list se : sy new sy cur sy stable de loc_rc6/1.2] ".*loc_tr/1.0\\s+cur:stable\\s+.*loc_rc6/1.2\\s+new\\s+.*" 1 | colorset_test_case {list -l} [list se : sy new sy cur sy stable de loc_rc6/1.2] ".*loc_tr/1.0\\s+cur:stable\\s+.*loc_rc6/1.2\\s+new\\s+.*" 1 | |||
colorset_test_case {list -l} [list hi Package hi Versions hi {Last mod.}] ".*- P ackage -.*- Versions -.*- Last mod. -.*" | colorset_test_case {list -l} [list hi Package hi Versions hi {Last mod.}] ".*- P ackage -.*- Versions -.*- Last mod. -.*" | |||
colorset_test_case {list -t} [list] ".*loc_tr/1.0\nloc_rc6/1.2" 0 | colorset_test_case {list -t} [list] ".*loc_tr/1.0\nloc_rc6/1.2" 0 | |||
# highlighted element (hi) on list | # highlighted element (hi) on list | |||
setenv_var __MODULES_LMALTNAME loc_tr/1.0&loc_tr/cur:loc_rc6/1.2&al|loc_rc6/1&al |loc_rc6/bar | setenv_var __MODULES_LMALTNAME loc_tr/1.0&loc_tr/cur:loc_rc6/1.2&al|loc_rc6/1&al |loc_rc6/bar | |||
colorset_test_case {list loc} [list hi loc se : se \\( se \\) sy new sy cur sy s table] ".*loc_tr/1.0\\(cur\\).*loc_rc6/1.2.*" 1 | colorset_test_case {list loc} [list hi loc se : se \\( se \\) sy new sy cur sy s table] ".*loc_tr/1.0\\(cur\\).*loc_rc6/1.2.*" 1 | |||
colorset_test_case {list -C tr} [list hi tr se : se \\( se \\) sy new sy cur sy stable] ".*loc_tr/1.0\\(cur\\).*" 1 | colorset_test_case {list -C tr} [list hi tr se : se \\( se \\) sy new sy cur sy stable] ".*loc_tr/1.0\\(cur\\).*" 1 | |||
colorset_test_case {list loc loc_rc} [list hi loc se : se \\( se \\) sy new sy c ur sy stable] ".*loc_tr/1.0\\(cur\\).*loc_rc6/1.2.*" 1 | colorset_test_case {list loc loc_rc} [list hi loc se : se \\( se \\) sy new sy c ur sy stable] ".*loc_tr/1.0\\(cur\\).*loc_rc6/1.2.*" 1 | |||
#FIXME: only first pattern is highlighted | colorset_test_case {list -C rc tr} [list hi rc hi tr se : se \\( se \\) sy new s | |||
colorset_test_case {list -C rc tr} [list hi rc se : se \\( se \\) sy new sy cur | y cur sy stable] ".*loc_tr/1.0\\(cur\\).*loc_rc6/1.2.*" 1 | |||
sy stable] ".*loc_tr/1.0\\(cur\\).*loc_rc6/1.2.*" 1 | ||||
unsetenv_loaded_module | unsetenv_loaded_module | |||
unsetenv_var __MODULES_LMALTNAME | unsetenv_var __MODULES_LMALTNAME | |||
# highlighted element (hi) on savelist | ||||
setenv_var HOME $env(HOME)/home | ||||
set tserr ".* 1\\) infocmd 2\\) infocmdexp " | ||||
colorset_test_case {savelist info} [list hi info] $tserr 1 | ||||
set tserr ".* | ||||
1\\) coll1 3\\) coll3 5\\) coll6.target 7\\) infocmdexp | ||||
2\\) coll2 4\\) coll4.target 6\\) infocmd " | ||||
colorset_test_case {savelist -w 80 coll info} [list hi coll hi info] $tserr 1 | ||||
setenv_var HOME $ORIG_HOME | ||||
# modulefile or collection command report (cm) | # modulefile or collection command report (cm) | |||
colorset_test_case {saveshow testsuite/home/.module/infocmd} [list cm module] ". *module use --append .*\nmodule load info/command.*" | colorset_test_case {saveshow testsuite/home/.module/infocmd} [list cm module] ". *module use --append .*\nmodule load info/command.*" | |||
colorset_test_case {display setenv/1.0} [list cm setenv] ".*setenv\t\ttestsuite yes.*" | colorset_test_case {display setenv/1.0} [list cm setenv] ".*setenv\t\ttestsuite yes.*" | |||
# test cumulated sgr codes | # test cumulated sgr codes | |||
setenv_var MODULES_COLORS {hi=1:db=2:tr=2:se=2:er=91:wa=93:me=95:in=94:mp=1;94:d i=94:al=96:de=4} | setenv_var MODULES_COLORS {hi=1:db=2:tr=2:se=2:er=91:wa=93:me=95:in=94:mp=1;94:d i=94:al=96:de=4} | |||
testerr_cmd_re sh {avail -t loc_dv7/2} ".*\033\\\[4;94m\033\\\[1mloc_dv7/2\033\\ \[22m.0\033\\\[0m/\n\033\\\[1mloc_dv7/2\033\\\[22m.0/1.0" | testerr_cmd_re sh {avail -t loc_dv7/2} ".*\033\\\[4;94m\033\\\[1mloc_dv7/2\033\\ \[22m.0\033\\\[0m/\n\033\\\[1mloc_dv7/2\033\\\[22m.0/1.0" | |||
testerr_cmd_re sh {avail -t loc_tr/a} ".*\033\\\[4;96m\033\\\[1mloc_tr/a\033\\\[ 22ml2\033\\\[0m.*" | testerr_cmd_re sh {avail -t loc_tr/a} ".*\033\\\[4;96m\033\\\[1mloc_tr/a\033\\\[ 22ml2\033\\\[0m.*" | |||
unsetenv_var MODULES_COLORS | unsetenv_var MODULES_COLORS | |||
End of changes. 3 change blocks. | ||||
28 lines changed or deleted | 18 lines changed or added |