############################################################################## # 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/full, trace/all_on, trace/all_off # Sub-Command: # # Comment: %C{ # Tests the 'conflict' command using a full qualified # module name. This tests the reactions of modulecmd # if the conflicting module is load or not and if # another module of the same 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/full" 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:$modulefile';" set lm_csh_troff "setenv LOADEDMODULES '$module_troff:$module';" 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_conflict "$error_msgs: Module '$module' conflicts with the currently loaded module\\(s\\) 'trace/all_on'\n" set err_exec "$error_msgs: Tcl command execution failed: conflict\ttrace/all_on\n" # # The tests # testerr_cmd_re "csh" "load $module_tron $module" "$lm_csh_tron$lmf_csh_tron$err_conflict$err_exec" test_cmd "csh" "load $module_troff $module" "$ts_csh$lmf_csh_troff$lm_csh_troff" test_cmd "csh" "load $module" "$lmf_csh$lm_csh$ts_csh" # # Cleanup # unset err_conflict 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