############################################################################## # Modules Revision 3.0 # Providing a flexible user environment # # File: modules.50-cmds/%M% # Revision: %I% # First Edition: 2002/05/02 # Last Mod.: %U%, %G% # # Authors: R.K. Owen, Ph.D., rk@owen.sj.ca.us # # Description: Testuite testsequence # Command: load # Modulefiles: eschars/1.0 # Sub-Command: # # Comment: %C{ # Tests the 'setenv' module subcommand for escaping # pathelogical chars. # }C% # ############################################################################## skip_if_quick_mode # 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 "pathelogical" to # be set up # set module "eschars/1.0" set modulefile "$modpath/$module" # # For the different shells ... # lappend ans_csh [list set pathelogical "abc\\ :\\ \\{\\}\\|\\<\\>\\!\\#\\$\\^\\&\\'\\\"\\(\\)@x%y\\\\z:sh\\*" noescval] lappend ans_csh [list set _LMFILES_ $modulefile] lappend ans_csh [list set LOADEDMODULES $module] lappend ans_sh [list set pathelogical "abc : {}|<>!#$^&'\\''\"()@x%y\\z:sh*\n" noescval] lappend ans_sh [list set _LMFILES_ $modulefile] lappend ans_sh [list set LOADEDMODULES $module] lappend ans_fish [list set pathelogical "abc : {}|<>!#$^&\\'\"()@x%y\\z:sh*\n" noescval] lappend ans_fish [list set _LMFILES_ $modulefile] lappend ans_fish [list set LOADEDMODULES $module] lappend ans2 [list set pathelogical "abc : {}|<>!#$^&'\"()@x%y\\z:sh*\n"] lappend ans2 [list set _LMFILES_ $modulefile] lappend ans2 [list set LOADEDMODULES $module] lappend ans_pwsh [list set pathelogical "abc : {}|<>!#$^&\\'\"()@x%y\\z:sh*\n"] lappend ans_pwsh [list set _LMFILES_ $modulefile] lappend ans_pwsh [list set LOADEDMODULES $module] # # The tests # foreach sh $supported_shells { switch -- $sh { sh - bash - ksh - zsh { test_cmd $sh "load $module" $ans_sh } fish { test_cmd $sh "load $module" $ans_fish } csh - tcsh { test_cmd $sh "load $module" $ans_csh } pwsh { test_cmd $sh "load $module" $ans_pwsh } default { test_cmd $sh "load $module" $ans2 } } } # # Cleanup # reset_test_env