Debian Codegraph @

testsuite/modules.95-version/020-unload.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: versions/1.1, versions/1.2, versions/1.3
15 # Sub-Command:
16 #
17 # Comment: %C{
18 # Tests the module versioning capability.
19 # specifically the unloading of a version.
20 # }C%
21 #
22 ##############################################################################
23
24 if {$verbose} {
25 send_user "\tUnloads of first and last version on a short stack...\n"
26 }
27
28 set env(MODULE_VERSION) "$version2"
29 set env(MODULE_VERSION_STACK) "$module_version_stack2"
30 setenv_loaded_module [list $module1 $module2] [list $modulefile1 $modulefile2]
31
32 #
33 # For the different shells ...
34 #
35
36 lappend ans [list set MODULE_VERSION_STACK $module_version_stack1]
37 lappend ans [list set _LMFILES_ $modulefile1]
38 lappend ans [list set LOADEDMODULES $module1]
39 lappend ans [list set MODULE_VERSION $version1]
40
41 #
42 # The tests
43 #
44
45 test_cmd_re "ALL" "unload $module2" $ans
46
47 skip_if_quick_mode
48
49
50 #
51 # Remove a version that is not on top of the stack
52 #
53 # For the different shells ...
54 #
55
56 set ans [list]
57 lappend ans [list set MODULE_VERSION_STACK $version2]
58 lappend ans [list set _LMFILES_ $modulefile2]
59 lappend ans [list set LOADEDMODULES $module2]
60 lappend ans [list set MODULE_VERSION $version2]
61
62
63 #
64 # The tests
65 #
66
67 # different behavior than C-version: on Tcl-version env variable value is
68 # set even if its current value does change
69 test_cmd_re "ALL" "unload $module1" $ans
70
71 #
72 # Cleanup
73 #
74
75 reset_test_env