"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "testsuite/modules.50-cmds/283-info-command-exp.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.

283-info-command-exp.exp  (modules-5.1.1.tar.bz2):283-info-command-exp.exp  (modules-5.2.0.tar.bz2)
skipping to change at line 14 skipping to change at line 14
# #
# File: modules.50-cmds/%M% # File: modules.50-cmds/%M%
# Revision: %I% # Revision: %I%
# First Edition: 2017/01/27 # First Edition: 2017/01/27
# Last Mod.: %U%, %G% # Last Mod.: %U%, %G%
# #
# Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr # Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr
# #
# Description: Testuite testsequence # Description: Testuite testsequence
# Command: load, display, whatis, search, source, restore # Command: load, display, whatis, search, source, restore
# Command: unload, switch, purge, reload, help, test # Command: unload, switch, purge, reload, help, test, reset
# Command: stash
# Modulefiles: info/commandexp # Modulefiles: info/commandexp
# Sub-Command: # Sub-Command:
# #
# Comment: %C{ # Comment: %C{
# Tests the 'module-info command' module subcommand with # Tests the 'module-info command' module subcommand with
# own suggestion. # own suggestion.
# This command does not change behaviour depending on # This command does not change behaviour depending on
# the user shell. Tests are made for the bourne shell # the user shell. Tests are made for the bourne shell
# here. # here.
# }C% # }C%
skipping to change at line 63 skipping to change at line 64
# test loading # test loading
testouterr_cmd "sh" "load $module" $ans "load" testouterr_cmd "sh" "load $module" $ans "load"
# test try-loading # test try-loading
testouterr_cmd sh "try-load $module" $ans try-load testouterr_cmd sh "try-load $module" $ans try-load
# test load-any # test load-any
testouterr_cmd sh "load-any $module" $ans load-any testouterr_cmd sh "load-any $module" $ans load-any
# test mod-to-sh
# specific test as this subcmd output shell code on report message channel
set tserr [shell_set sh INFOCMD mod-to-sh]
testouterr_cmd sh "mod-to-sh sh $module" [list [list OK nop]] $tserr
# test reset
setenv_var __MODULES_LMINIT "module use --append $modpath:module load $module"
testouterr_cmd sh reset $ans reset\n[msg_load $module]
unsetenv_var __MODULES_LMINIT
# test stash
setenv_var __MODULES_LMINIT "module use --append $modpath:module load $module"
testouterr_cmd sh stash $ans stash\n[msg_load $module]
unsetenv_var __MODULES_LMINIT
# test stashpop
setenv_loaded_module [list $module] [list $modulefile]
testouterr_cmd sh stashpop $ansun stashpop\n[msg_unload $module]
unsetenv_loaded_module
file delete $env(HOME)/.module
# test displaying # test displaying
testouterr_cmd_re "sh" "display $module" "OK" "$modlin\n$modulefilere:\n\ndispla y\n$modlin" testouterr_cmd_re "sh" "display $module" "OK" "$modlin\n$modulefilere:\n\ndispla y\n$modlin"
# test whatis # test whatis
testouterr_cmd_re "sh" "whatis $module" "OK" "$header\n\\s+$module: whatis" testouterr_cmd_re "sh" "whatis $module" "OK" "$header\n\\s+$module: whatis"
# test searching # test searching
# error found in interpreted module, so an error code is rendered # error found in interpreted module, so an error code is rendered
testouterr_cmd_re "sh" "search search" "ERR" "$header\n(\\s+\\S+: search\\n)*\\s +$module: search" testouterr_cmd_re "sh" "search search" "ERR" "$header\n(\\s+\\S+: search\\n)*\\s +$module: search"
skipping to change at line 84 skipping to change at line 106
testouterr_cmd "sh" "source $modulefile" "OK" "source" testouterr_cmd "sh" "source $modulefile" "OK" "source"
# set HOME to location containing collections # set HOME to location containing collections
set homewithcoll "$env(HOME)/home" set homewithcoll "$env(HOME)/home"
if { $verbose > 0 } { if { $verbose > 0 } {
send_user "\tSetup HOME = $homewithcoll\n" send_user "\tSetup HOME = $homewithcoll\n"
} }
set env(HOME) "$homewithcoll" set env(HOME) "$homewithcoll"
# test restoring # test restoring
testouterr_cmd "sh" "restore infocmdexp" $ans "restore\nLoading info/commandexp" testouterr_cmd "sh" "restore infocmdexp" $ans restore\n[msg_load $module]
# restore default testsuite home # restore default testsuite home
if { $verbose > 0 } { if { $verbose > 0 } {
send_user "\tRestore HOME = $ORIG_HOME\n" send_user "\tRestore HOME = $ORIG_HOME\n"
} }
set env(HOME) $ORIG_HOME set env(HOME) $ORIG_HOME
# Set up the environment for test that require the module to be loaded # Set up the environment for test that require the module to be loaded
setenv_loaded_module $module $modulefile setenv_loaded_module $module $modulefile
# test unloading # test unloading
testouterr_cmd "sh" "unload $module" $ansun "unload" testouterr_cmd "sh" "unload $module" $ansun "unload"
# test switching # test switching
testouterr_cmd "sh" "switch $module $module" $ans "switch\nswitch" testouterr_cmd "sh" "switch $module $module" $ans "switch\nswitch"
# test refreshing # test refreshing
setenv_var __MODULES_LMREFRESH $module
testouterr_cmd sh refresh OK refresh testouterr_cmd sh refresh OK refresh
unsetenv_var __MODULES_LMREFRESH
# test purging # test purging
testouterr_cmd "sh" "purge" $ansun "purge" testouterr_cmd "sh" "purge" $ansun "purge"
# test reloading # test reloading
testouterr_cmd "sh" "reload" $ans "reload\nreload" testouterr_cmd "sh" "reload" $ans "reload\nreload"
# Clean up the just changed environment # Clean up the just changed environment
unsetenv_loaded_module unsetenv_loaded_module
 End of changes. 5 change blocks. 
2 lines changed or deleted 26 lines changed or added

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