Debian Codegraph @

testsuite/modules.95-version/022-unload2.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 skip_if_quick_mode
25
26 if {$verbose} {
27 send_user "\tUnload of version on a tall stack ...\n"
28 }
29
30 set env(MODULE_VERSION) "$version3"
31 set env(MODULE_VERSION_STACK) "$module_version_stack3"
32 setenv_loaded_module [list $module1 $module2 $module3] [list $modulefile1 $modulefile2 $modulefile3]
33
34 #
35 # For the different shells ...
36 #
37
38 lappend ans [list set MODULE_VERSION_STACK $module_version_stack2]
39 lappend ans [list set _LMFILES_ "$modulefile1:$modulefile2"]
40 lappend ans [list set LOADEDMODULES "$module1:$module2"]
41 lappend ans [list set MODULE_VERSION $version2]
42
43
44 #
45 # The tests
46 #
47
48 test_cmd_re "ALL" "unload $module3" $ans
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 "$version3:$version1"]
58 lappend ans [list set _LMFILES_ "$modulefile1:$modulefile3"]
59 lappend ans [list set LOADEDMODULES "$module1:$module3"]
60 lappend ans [list set MODULE_VERSION $version3]
61
62 #
63 # The tests
64 #
65
66 # different behavior than C-version: on Tcl-version env variable value is
67 # set even if its current value does change
68 test_cmd_re "ALL" "unload $module2" $ans
69
70 #
71 # Cleanup
72 #
73
74 reset_test_env