Debian Codegraph @

testsuite/modulefiles/test/2.0

raw
1 #%Module1.0
2
3 ##############################################################################
4 # Modules Revision 3.0
5 # Providing a flexible user environment
6 #
7 # File: test/%M%
8 # Revision: %I%
9 # First Edition: 2017/04/30
10 # Last Mod.: %U%, %G%
11 #
12 # Authors: Xavier Delaruelle, [email protected]
13 #
14 # Description: Testuite modulefile
15 # Command:
16 # Sub-Command: test
17 #
18 # Invocation: display @M@, help @M@, test @M@
19 # Result: %R{
20 # }R%
21 # Comment: %C{
22 # Test the module 'test' command
23 # }C%
24 #
25 ##############################################################################
26
27 # test procedure
28 proc ModulesTest { } {
29 puts stderr Test_err
30
31 if {[info exists ::env(TEST)]} {
32 return 1
33 } else {
34 return 0
35 }
36 }
37
38 #
39 # The following should lead to no result in test mode
40 #
41
42 set-alias al-testsuite "ps -auxww | grep modulecmd"
43 unset-alias al-testsuite
44
45 setenv testsuite yes
46 append-path testsuite no
47 prepend-path testsuite maybe
48 remove-path testsuite yes
49 unsetenv testsuite
50
51 x-resource my-prog*my-ress:true
52
53 system ls
54
55 module load setenv/1.0
56
57 module-alias foo setenv/1.0
58 module-version foo foo bar blah
59
60 #
61 # Don't corrupt the 'apropos' tests ...
62 #
63
64 if { ![module-info mode whatis] } {
65 module-whatis "Some checks for TEST and DISPLAY"
66 }