"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "testsuite/config/base-config.exp" between
modules-5.1.1.tar.bz2 and modules-5.2.0.tar.bz2

About: The Environment Modules package provides for the dynamic modification of a user’s environment via modulefiles.

base-config.exp  (modules-5.1.1.tar.bz2):base-config.exp  (modules-5.2.0.tar.bz2)
skipping to change at line 569 skipping to change at line 569
set answer "system${esc}('$xrdb -merge', input='$var:'${esc})" set answer "system${esc}('$xrdb -merge', input='$var:'${esc})"
} }
default { default {
set answer "" set answer ""
} }
} }
return $answer return $answer
} }
proc shell_out {test_shell out_list {re_mode 0}} { proc shell_out {test_shell out_list {re_mode 0} {auto_status 1}} {
set answer_list {} set answer_list {}
set fixed_list {} set fixed_list {}
array set envvar {} array set envvar {}
array set envalias {} array set envalias {}
array set envxres {} array set envxres {}
array set envunxres {} array set envunxres {}
array set autovar {} array set autovar {}
set status_set 0 set status_set 0
foreach out $out_list { foreach out $out_list {
skipping to change at line 741 skipping to change at line 741
lappend answer_list $envunxres($var) lappend answer_list $envunxres($var)
} }
set answer_list [concat $answer_list $fixed_list] set answer_list [concat $answer_list $fixed_list]
} }
if {$test_shell eq "python"} { if {$test_shell eq "python"} {
set answer_list [concat [list "import os"] $answer_list] set answer_list [concat [list "import os"] $answer_list]
} }
# add automatic status if any for shell # add automatic status if any for shell
if {!$status_set && [llength $answer_list] > 0} { if {$auto_status && !$status_set && [llength $answer_list] > 0} {
lappend answer_list [shell_ok $test_shell $re_mode] lappend answer_list [shell_ok $test_shell $re_mode]
} }
set answer [join $answer_list "\n"] set answer [join $answer_list "\n"]
return $answer return $answer
} }
proc is_shell_out_list {answer} { proc is_shell_out_list {answer} {
set ret 0 set ret 0
skipping to change at line 953 skipping to change at line 953
set ol [string length $comp_file] set ol [string length $comp_file]
set oe [string length $answer] set oe [string length $answer]
send_user "FILE\[$ol\]: '$comp_file'#>\n" send_user "FILE\[$ol\]: '$comp_file'#>\n"
send_user "EXP\[$oe\]: '$answer'#>\n" send_user "EXP\[$oe\]: '$answer'#>\n"
return 0; return 0;
} else { } else {
return 1; return 1;
} }
} }
proc _test_globlist {test_shell cmd fileglob answer} {
global verbose
set globlist [lsort [glob -nocomplain $fileglob]]
if { $globlist ne $answer } {
fail "$cmd ($test_shell)"
set ol [string length $globlist]
set oe [string length $answer]
send_user "GLOBLIST\[$ol\]: '$globlist'#>\n"
send_user "EXP\[$oe\]: '$answer'#>\n"
return 0;
} else {
return 1;
}
}
proc _test_exit {test_shell cmd exitval} { proc _test_exit {test_shell cmd exitval} {
global comp_exit global comp_exit
global verbose global verbose
if { $comp_exit != "$exitval" } { if { $comp_exit != "$exitval" } {
fail "$cmd ($test_shell)" fail "$cmd ($test_shell)"
send_user "EXIT: '$comp_exit'#>\n" send_user "EXIT: '$comp_exit'#>\n"
send_user "EXP: '$exitval'#>\n" send_user "EXP: '$exitval'#>\n"
return 0; return 0;
} else { } else {
skipping to change at line 1159 skipping to change at line 1176
} }
} else { } else {
_test_sub $test_shell "$cmd" _test_sub $test_shell "$cmd"
if { [ _test_out $test_shell "$cmd" "$answer" ] if { [ _test_out $test_shell "$cmd" "$answer" ]
&& [ _test_file $test_shell "$cmd" "$filepath" "$ansfile" ] } { && [ _test_file $test_shell "$cmd" "$filepath" "$ansfile" ] } {
_test_ok $test_shell "$cmd" _test_ok $test_shell "$cmd"
} }
} }
} }
proc testouterrfile_cmd {test_shell cmd answer anserr filepath ansfile} {
if {$test_shell eq "ALL"} {
global supported_shells
foreach shell $supported_shells {
testouterrfile_cmd $shell $cmd $answer $anserr $filepath $ansfile
}
} else {
_test_sub $test_shell "$cmd"
if { [ _test_out $test_shell "$cmd" "$answer" ]
&& [ _test_err $test_shell "$cmd" "$anserr" ]
&& [ _test_file $test_shell "$cmd" "$filepath" "$ansfile" ] } {
_test_ok $test_shell "$cmd"
}
}
}
proc testouterrfileglob_cmd {test_shell cmd answer anserr fileglob ansfile} {
_test_sub $test_shell "$cmd"
set filepath [lindex [lsort [glob $fileglob]] end]
if { [ _test_out $test_shell "$cmd" "$answer" ]
&& [ _test_err $test_shell "$cmd" "$anserr" ]
&& [ _test_file $test_shell "$cmd" "$filepath" "$ansfile" ] } {
_test_ok $test_shell "$cmd"
}
}
#
# Test procedure for full text matching with stdout, stderr and glob file list
#
proc testouterrgloblist_cmd {test_shell cmd answer anserr fileglob ansglob} {
if {$test_shell eq {ALL}} {
global supported_shells
foreach shell $supported_shells {
testouterrgloblist_cmd $shell $cmd $answer $anserr $fileglob $ansglo
b
}
} else {
_test_sub $test_shell $cmd
if { [ _test_out $test_shell $cmd $answer ]
&& [ _test_err $test_shell $cmd $anserr ]
&& [ _test_globlist $test_shell $cmd $fileglob $ansglob ] } {
_test_ok $test_shell $cmd
}
}
}
# #
# Change and restore file permissions to trigger specific behaviors # Change and restore file permissions to trigger specific behaviors
# #
proc change_file_perms {name perms} { proc change_file_perms {name perms} {
global verbose file_orig_perms global verbose file_orig_perms
# backup original file permission to restore them later # backup original file permission to restore them later
set file_orig_perms($name) [file attributes $name -permissions] set file_orig_perms($name) [file attributes $name -permissions]
 End of changes. 4 change blocks. 
2 lines changed or deleted 66 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)