| 1 |
############################################################################## |
| 2 |
# Modules Revision 3.0 |
| 3 |
# Providing a flexible user environment |
| 4 |
# |
| 5 |
# File: modules.50-cmds/%M% |
| 6 |
# Revision: %I% |
| 7 |
# First Edition: 1995/12/06 |
| 8 |
# Last Mod.: %U%, %G% |
| 9 |
# |
| 10 |
# Authors: Jens Hamisch, [email protected] |
| 11 |
# |
| 12 |
# Description: Testuite testsequence |
| 13 |
# Command: unload |
| 14 |
# Modulefiles: alias/2.0 |
| 15 |
# Sub-Command: |
| 16 |
# |
| 17 |
# Comment: %C{ |
| 18 |
# Tests the reverse 'set-alias' module subcommand for all |
| 19 |
# allowed shell types. |
| 20 |
# }C% |
| 21 |
# |
| 22 |
############################################################################## |
| 23 |
|
| 24 |
# |
| 25 |
# Variables. This test forces a module unload command. It will result in the |
| 26 |
# environment variables "_LMFILES_", "LOADEDMODULES" and "testsuite" to |
| 27 |
# be set up |
| 28 |
# |
| 29 |
|
| 30 |
set module "alias/2.0" |
| 31 |
set modulefile "$modpath/$module" |
| 32 |
|
| 33 |
# |
| 34 |
# Set up the environment for reversal ... |
| 35 |
# |
| 36 |
|
| 37 |
setenv_loaded_module $module $modulefile |
| 38 |
setenv_var __MODULES_LMREFRESH $module |
| 39 |
|
| 40 |
# |
| 41 |
# For the different shells ... |
| 42 |
# |
| 43 |
|
| 44 |
lappend ans [list unset _LMFILES_] |
| 45 |
lappend ans [list unset LOADEDMODULES] |
| 46 |
lappend ans [list unset __MODULES_LMREFRESH] |
| 47 |
lappend ans [list unalias testsuite] |
| 48 |
|
| 49 |
# |
| 50 |
# The tests |
| 51 |
# |
| 52 |
test_cmd "ALL" "unload $module" $ans |
| 53 |
|
| 54 |
# |
| 55 |
# Cleanup |
| 56 |
# |
| 57 |
|
| 58 |
reset_test_env |