############################################################################## # Modules Revision 3.0 # Providing a flexible user environment # # File: modules.50-cmds/%M% # Revision: %I% # First Edition: 95/12/06 # Last Mod.: %U%, %G% # # Authors: Jens Hamisch, Jens.Hamisch@Strawberry.COM # # Description: Testuite testsequence # Command: load # Modulefiles: conflict/module, trace/all_on, trace/all_off # Sub-Command: # # Comment: %C{ # Tests the 'conflict' command using a category # module name. This tests the reactions of modulecmd # if the conflicting module is not load or if # some module of the conflicting category is load. # }C% # ############################################################################## # # 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 "conflict/module" set modulefile "$env(MODULEPATH)/$module" set module_tron "trace/all_on" set modulefile_tron "$env(MODULEPATH)/$module_tron" set module_troff "trace/all_off" set modulefile_troff "$env(MODULEPATH)/$module_troff" # # Only for the csh # set lmf_csh_troff "setenv _LMFILES_ '$modulefile_troff';" set lm_csh_troff "setenv LOADEDMODULES '$module_troff';" set lmf_csh_tron "setenv _LMFILES_ '$modulefile_tron';" set lm_csh_tron "setenv LOADEDMODULES '$module_tron';" set lmf_csh "setenv _LMFILES_ '$modulefile';" set lm_csh "setenv LOADEDMODULES '$module';" set ts_csh "setenv testsuite 'yes';" # # Error messages # set err_tron "$error_msgs: Module '$module' conflicts with the currently loaded module\\(s\\) 'trace/all_on'\n" set err_troff "$error_msgs: Module '$module' conflicts with the currently loaded module\\(s\\) 'trace/all_off'\n" set err_exec "$error_msgs: Tcl command execution failed: conflict\ttrace\n" # # The tests # testerr_cmd_re "csh" "load $module_tron $module" "$lm_csh_tron$lmf_csh_tron$err_tron$err_exec" testerr_cmd_re "csh" "load $module_troff $module" "$lm_csh_troff$lmf_csh_troff$err_troff$err_exec" test_cmd "csh" "load $module" "$lmf_csh$lm_csh$ts_csh" # # Cleanup # unset err_troff unset err_tron unset err_exec unset ts_csh unset lm_csh_tron unset lmf_csh_tron unset lm_csh_troff unset lmf_csh_troff unset lm_csh unset lmf_csh unset modulefile unset module unset modulefile_tron unset module_tron unset modulefile_troff unset module_troff