Debian Codegraph @

testsuite/modules.50-cmds/036-unsetenv-x.exp

raw
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: 2001/06/20
8 # Last Mod.: %U%, %G%
9 #
10 # Authors: R.K. Owen, [email protected]
11 #
12 # Description: Testuite testsequence
13 # Command: load & unload
14 # Modulefiles: unsetenv/0.9
15 # Sub-Command:
16 #
17 # Comment: %C{
18 # Tests the newer features of the 'unsetenv' module
19 # subcommand for all allowed shell types.
20 # }C%
21 #
22 ##############################################################################
23
24 skip_if_quick_mode
25
26 #
27 # Variables. This test forces a module load command. It will result in the
28 # environment variables "_LMFILES_", "LOADEDMODULES" and "testsuite" to
29 # be set up
30 #
31
32 set module "unsetenv/0.9"
33 set modulefile "$modpath/$module"
34
35 #
36 # Set up the environment for reversal ...
37 #
38
39 set env(testsuite) "'yes'"
40
41 #
42 # For the different shells ...
43 #
44
45 lappend ans [list set _LMFILES_ $modulefile]
46 lappend ans [list set LOADEDMODULES $module]
47 lappend ans [list unset testsuite]
48
49 #
50 # The tests
51 #
52 # load
53
54 test_cmd "ALL" "load $module" $ans
55
56 # unload
57 # set up the environment
58 setenv_loaded_module $module $modulefile
59
60 set ans [list]
61 lappend ans [list unset _LMFILES_]
62 lappend ans [list unset LOADEDMODULES]
63 lappend ans [list set testsuite UNSET]
64
65
66 test_cmd "ALL" "unload $module" $ans
67
68 #
69 # Cleanup
70 #
71
72 reset_test_env