Debian Codegraph @

testsuite/modules.50-cmds/025-setenv-undo.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: 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: setenv/1.0
15 # Sub-Command:
16 #
17 # Comment: %C{
18 # Tests the reverse 'setenv' module subcommand for all
19 # allowed shell types.
20 # }C%
21 #
22 ##############################################################################
23
24 skip_if_quick_mode
25
26 #
27 # Variables. This test forces a module unload command. It will result in the
28 # environment variables "_LMFILES_", "LOADEDMODULES" and "testsuite" to
29 # be set up
30 #
31
32 set module "setenv/1.0"
33 set modulefile "$modpath/$module"
34
35 #
36 # Set up the environment for reversal ...
37 #
38
39 set env(testsuite) "'yes'"
40 setenv_loaded_module $module $modulefile
41
42 #
43 # For the different shells ...
44 #
45
46 lappend ans [list unset _LMFILES_]
47 lappend ans [list unset LOADEDMODULES]
48 lappend ans [list unset testsuite]
49
50 #
51 # The tests
52 #
53
54 test_cmd "ALL" "unload $module" $ans
55
56 #
57 # Cleanup
58 #
59
60 unset ans
61
62 unset modulefile
63 unset module
64
65 #
66 # Clean up the environment, too
67 #
68
69 reset_test_env