Debian Codegraph @

testsuite/modulefiles/info/mode3

raw
1 #%Module1.0
2
3 ##############################################################################
4 # Modules Revision 3.0
5 # Providing a flexible user environment
6 #
7 # File: info/%M%
8 # Revision: %I%
9 # First Edition: 95/12/06
10 # Last Mod.: %U%, %G%
11 #
12 # Authors: Jens Hamisch, [email protected]
13 #
14 # Description: Testuite modulefile
15 # Command:
16 # Sub-Command: module-info mode
17 #
18 # Invocation: load @M@/@V@, unload @M@/@V@, display @M@/@V@
19 # Invocation: switch @M@/mode3 @M@/mode4, help @M@/@V@
20 # Result: %R(load){
21 # load
22 # setenv _LMFILES_ ${_LMFILES_}:@M@/@V@
23 # setenv LOADEDMODULES ${LOADEDMODULES}:@P@/@M@/@V@
24 # }R%
25 # %R(unload){
26 # remove
27 # unsetenv _LMFILES_
28 # unsetenv LOADEDMODULES
29 # }R%
30 # %R(display){
31 # -------------------------------------------------------------------
32 # @P@/@M@/@V@:
33 #
34 # display
35 # -------------------------------------------------------------------
36 # }R%
37 # %R(switch){
38 # remove
39 # switch1
40 # switch
41 # switch2
42 # switch
43 # remove
44 # switch3
45 # switch
46 # setenv _LMFILES_ ${_LMFILES_}:@M@/mode2
47 # setenv LOADEDMODULES ${LOADEDMODULES}:@P@/@M@/mode2
48 # }R%
49 # %R(help){
50 # ----------- Module Specific Help for '@M@/@V@' -----------------
51 #
52 # help
53 # }R%
54 # Comment: %C{
55 # This modulefile checks the probing for the current
56 # modulecmd runmode
57 # }C%
58 #
59 ##############################################################################
60
61 proc ModulesHelp { } {
62 if { [module-info mode help] } {
63 puts stderr "help"
64 }
65 }
66
67 proc ModulesTest { } {
68 if { [module-info mode test] } {
69 puts stderr "test"
70 }
71 return 1
72 }
73
74 if { ![module-info mode whatis] } {
75
76 #
77 # module-info mode is called here explicitly in order to check if it works!
78 #
79
80 if { [module-info mode load] } {
81 puts stdout "load"
82 }
83 if { [module-info mode unload] } {
84 puts stdout "unload"
85 }
86 if { [module-info mode remove] } {
87 puts stdout "remove"
88 }
89 if { [module-info mode refresh] } {
90 puts stdout "refresh"
91 }
92 if { [module-info mode nonpersist] } {
93 puts stdout "nonpersist"
94 }
95 if { [module-info mode display] } {
96 puts stdout "display"
97 }
98 if { [module-info mode help] } {
99 puts stdout "help"
100 }
101 if { [module-info mode test] } {
102 puts stdout "test"
103 }
104 if { [module-info mode switch1] } {
105 puts stdout "switch1"
106 }
107 if { [module-info mode switch2] } {
108 puts stdout "switch2"
109 }
110 if { [module-info mode switch3] } {
111 puts stdout "switch3"
112 }
113 if { [module-info mode whatis] } {
114 puts stdout "whatis"
115 }
116
117 #
118 # module-info mode switch overlays switch?
119 #
120
121 if { [module-info mode switch] } {
122 puts stdout "switch"
123 }
124 }