File: 022-unload2.exp

package info (click to toggle)
modules 5.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 20,572 kB
  • sloc: exp: 46,525; sh: 5,261; tcl: 3,182; makefile: 1,355; ansic: 466; python: 251; csh: 201; perl: 47; ruby: 44
file content (74 lines) | stat: -rw-r--r-- 1,811 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
##############################################################################
#   Modules Revision 3.0
#   Providing a flexible user environment
#
#   File:		modules.50-cmds/%M%
#   Revision:		%I%
#   First Edition:	2001/06/20
#   Last Mod.:		%U%, %G%
#
#   Authors:		R.K. Owen,  rk@owen.sj.ca.us
#
#   Description:	Testuite testsequence
#   Command:		load & unload
#   Modulefiles:	versions/1.1, versions/1.2, versions/1.3
#   Sub-Command:
#
#   Comment:	%C{
#			Tests the module versioning capability.
#			specifically the unloading of a version.
#		}C%
#
##############################################################################

skip_if_quick_mode

if { $verbose > 0 } {
	send_user "\tUnload of version on a tall stack ...\n"
}

set env(MODULE_VERSION) "$version3"
set env(MODULE_VERSION_STACK) "$module_version_stack3"
setenv_loaded_module [list $module1 $module2 $module3] [list $modulefile1 $modulefile2 $modulefile3]

#
#  For the different shells ...
#

lappend ans [list set MODULE_VERSION_STACK $module_version_stack2]
lappend ans [list set _LMFILES_ "$modulefile1:$modulefile2"]
lappend ans [list set LOADEDMODULES "$module1:$module2"]
lappend ans [list set MODULE_VERSION $version2]


#
#  The tests
#

test_cmd_re "ALL" "unload $module3" $ans

#
# Remove a version that is not on top of the stack
#
#  For the different shells ...
#

set ans [list]
lappend ans [list set MODULE_VERSION_STACK "$version3:$version1"]
lappend ans [list set _LMFILES_ "$modulefile1:$modulefile3"]
lappend ans [list set LOADEDMODULES "$module1:$module3"]
lappend ans [list set MODULE_VERSION $version3]

#
#  The tests
#

# different behavior than C-version: on Tcl-version env variable value is
# set even if its current value does change
test_cmd_re "ALL" "unload $module2" $ans

#
#  Cleanup
#

reset_test_env