Debian Codegraph @

testsuite/modulefiles/info/commandexp

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: 2017/01/27
10 # Last Mod.: %U%, %G%
11 #
12 # Authors: Xavier Delaruelle, [email protected]
13 #
14 # Description: Testuite modulefile
15 # Command:
16 # Sub-Command: module-info command
17 #
18 # Invocation:
19 # Result: %R{
20 # }R%
21 # Comment: %C{
22 # This modulefile checks the string representations of
23 # the current module command returned by the
24 # 'module-info command' command
25 # }C%
26 #
27 ##############################################################################
28
29 proc ModulesHelp { } {
30 if { [module-info command help] } {
31 puts stderr "help"
32 }
33 }
34
35 proc ModulesTest { } {
36 if { [module-info command test] } {
37 puts stderr "test"
38 }
39 return 1
40 }
41
42 if { ![module-info mode whatis] } {
43 if { [module-info command load] } {
44 puts stderr "load"
45 }
46 if { [module-info command try-load] } {
47 puts stderr "try-load"
48 }
49 if { [module-info command load-any] } {
50 puts stderr "load-any"
51 }
52 if { [module-info command mod-to-sh] } {
53 setenv INFOCMD mod-to-sh
54 }
55 if { [module-info command reset] } {
56 puts stderr reset
57 }
58 if { [module-info command stash] } {
59 puts stderr stash
60 }
61 if { [module-info command stashpop] } {
62 puts stderr stashpop
63 }
64 if { [module-info command unload] } {
65 puts stderr "unload"
66 }
67 if { [module-info command refresh] } {
68 puts stderr "refresh"
69 }
70 if { [module-info command reload] } {
71 puts stderr "reload"
72 }
73 if { [module-info command source] } {
74 puts stderr "source"
75 }
76 if { [module-info command switch] } {
77 puts stderr "switch"
78 }
79 if { [module-info command display] } {
80 puts stderr "display"
81 }
82 if { [module-info command purge] } {
83 puts stderr "purge"
84 }
85 if { [module-info command restore] } {
86 puts stderr "restore"
87 }
88 if { [module-info command help] } {
89 puts stderr "help"
90 }
91 if { [module-info command test] } {
92 puts stderr "test"
93 }
94 } else {
95 if { [module-info command whatis] } {
96 module-whatis "whatis"
97 }
98 if { [module-info command search] } {
99 module-whatis "search"
100 }
101 }