Debian Codegraph @

testsuite/modules.50-cmds/230-loop.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: 2006/02/21
8 # Last Mod.: %U%, %G%
9 #
10 # Authors: R.K. Owen, <[email protected]>
11 #
12 # Description: Testuite testsequence
13 # Command: load
14 # Modulefiles: break/4.0, break/6.0
15 # continue/4.0, continue/6.0
16 # Sub-Command:
17 #
18 # Comment: %C{
19 # Tries the Tcl "break" and "continue" used in
20 # a valid loop
21 # }C%
22 #
23 ##############################################################################
24
25 skip_if_quick_mode
26
27 # ensure auto symbolic versions are not set for these tests
28 setenv_var MODULES_ADVANCED_VERSION_SPEC 0
29
30 set break4 "break/4.0"
31 set cont4 "continue/4.0"
32 set break6 "break/6.0"
33 set cont6 "continue/6.0"
34
35 set break4p "$modpath/$break4"
36 set cont4p "$modpath/$cont4"
37 set break6p "$modpath/$break6"
38 set cont6p "$modpath/$cont6"
39
40 #
41 # set up an empty environment
42 #
43 set module ""
44 set modulefile ""
45 setenv_loaded_module $module $modulefile
46
47 #
48 # load (break)
49 # For the different shells ...
50 #
51 set module "$break4"
52 set modulefile "$break4p"
53
54 lappend ans [list set _LMFILES_ $modulefile]
55 lappend ans [list set LOADEDMODULES $module]
56 lappend ans [list set testsuite4 9]
57
58 #
59 # The tests
60 #
61 test_cmd "ALL" "load $break4" $ans
62
63 #
64 # load (continue)
65 # For the different shells ...
66 #
67 set module "$cont4"
68 set modulefile "$cont4p"
69
70 set ans [list]
71 lappend ans [list set _LMFILES_ $modulefile]
72 lappend ans [list set LOADEDMODULES $module]
73 lappend ans [list set testsuite4 9]
74
75 #
76 # The tests
77 #
78 test_cmd "ALL" "load $cont4" $ans
79
80
81 #
82 # load (break called from loop within proc)
83 # For the different shells ...
84 #
85 set module "$break6"
86 set modulefile "$break6p"
87
88 set ans [list]
89 lappend ans [list set testsuite6 9]
90 lappend ans [list set _LMFILES_ $modulefile]
91 lappend ans [list set LOADEDMODULES $module]
92
93 #
94 # The tests
95 #
96 test_cmd "ALL" "load $break6" $ans
97
98
99 #
100 # load (continue called from loop within proc)
101 # For the different shells ...
102 #
103 set module "$cont6"
104 set modulefile "$cont6p"
105
106 set ans [list]
107 lappend ans [list set testsuite6 9]
108 lappend ans [list set _LMFILES_ $modulefile]
109 lappend ans [list set LOADEDMODULES $module]
110
111 #
112 # The tests
113 #
114 test_cmd "ALL" "load $cont6" $ans
115
116
117 #
118 # Cleanup
119 #
120
121 reset_test_env