############################################################################## # Modules Revision 3.0 # Providing a flexible user environment # # File: modules.10-use/%M% # Revision: %I% # First Edition: 95/12/06 # Last Mod.: %U%, %G% # # Authors: Jens Hamisch, Jens.Hamisch@Strawberry.COM # # Description: Testuite testsequence # Command: use # Sub-Command: # # Comment: %C{ # Check the 'module use' command for the uninitialized # modulecmd. This should end up in the setup of the # MODULEPATH environment variable # }C% # ############################################################################## # # Variables for this test # set path "$pwd/modulefiles.other" set badpath "$pwd/modulefiles.bad" set mod_path "$path:$env(MODULEPATH)" set bad_use "$error_msgs: Directory '$badpath' not found" set use "use" # # The tests ... # test_cmd "sh" "$use $path" "MODULEPATH='$mod_path';export MODULEPATH;" test_cmd "ksh" "$use $path" "MODULEPATH='$mod_path';export MODULEPATH;" test_cmd "zsh" "$use $path" "MODULEPATH='$mod_path';export MODULEPATH;" test_cmd "csh" "$use $path" "setenv MODULEPATH '$mod_path';" test_cmd "tcsh" "$use $path" "setenv MODULEPATH '$mod_path';" test_cmd "perl" "$use $path" "\$ENV{'MODULEPATH'} = '$mod_path';" # # test if use non-existent modulefile directory # testerr_cmd_re "sh" "$use $badpath" "$bad_use" testerr_cmd_re "ksh" "$use $badpath" "$bad_use" testerr_cmd_re "zsh" "$use $badpath" "$bad_use" testerr_cmd_re "csh" "$use $badpath" "$bad_use" testerr_cmd_re "tcsh" "$use $badpath" "$bad_use" testerr_cmd_re "perl" "$use $badpath" "$bad_use" # # Cleanup # unset path unset mod_path unset use unset badpath unset bad_use