############################################################################## # Modules Revision 3.0 # Providing a flexible user environment # # File: modules.50-cmds/%M% # Revision: %I% # First Edition: 1995/12/06 # Last Mod.: %U%, %G% # # Authors: Jens Hamisch, Jens.Hamisch@Strawberry.COM # # Description: Testuite testsequence # Command: load # Modulefiles: unsetenv/1.0 # Sub-Command: # # Comment: %C{ # Tests the 'unsetenv' module subcommand for all allowed # shell types. # }C% # ############################################################################## # ensure auto symbolic versions are not set for these tests setenv_var MODULES_ADVANCED_VERSION_SPEC 0 # # Variables. This test forces a module load command. It will result in the # environment variables "_LMFILES_", "LOADEDMODULES" and "testsuite" to # be set up # set module "unsetenv/1.0" set modulefile "$modpath/$module" # # Set up the environment for reversal ... # set env(testsuite) "'yes'" # # For the different shells ... # lappend ans [list set _LMFILES_ $modulefile] lappend ans [list set LOADEDMODULES $module] lappend ans [list unset testsuite] # # The tests # test_cmd "ALL" "load $module" $ans skip_if_quick_mode # # bad specification test # set mp $modpath.3 setenv_path_var MODULEPATH $mp setenv_var TESTSUITE_UNSETENV bad1 unsetenv_var TS1 set ln [expr {[cmpversion $tclsh_version 8.5] < 1 ? {2} : {5}}] set tserr [escre [msg_load unsetenv/2.0 [msg_moderr {wrong # args: should be "unsetenv ?--noop-on-unload? ?--unset-on-unload? var ?val?"} {unsetenv TS1 foo bar} $mp/unsetenv/2.0 $ln]]] testouterr_cmd_re sh {load unsetenv/2.0} ERR $tserr setenv_var TS1 foo testouterr_cmd_re sh {load unsetenv/2.0} ERR $tserr unsetenv_var TS1 unsetenv_var TESTSUITE_UNSETENV # # Cleanup # reset_test_env