| 1 |
#%Module1.0 |
| 2 |
|
| 3 |
############################################################################## |
| 4 |
# Modules Revision 3.0 |
| 5 |
# Providing a flexible user environment |
| 6 |
# |
| 7 |
# File: alias/%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: set-alias, unset-alias, setenv, append-path, |
| 17 |
# Sub-Command: prepend-path, remove-path, unsetenv, x-resource, |
| 18 |
# Sub-Command: module-user, module-verbosity, module-trace, |
| 19 |
# Sub-Command: module-log, system, module, module-alias, |
| 20 |
# Sub-Command: module-version, module-info mode, module-whatis |
| 21 |
# |
| 22 |
# Invocation: display @M@, help @M@ |
| 23 |
# Result: %R(display){ |
| 24 |
# ------------------------------------------------------------------- |
| 25 |
# @P@/@M@/@V@: |
| 26 |
# |
| 27 |
# set-alias al-testsuite ps -auxww | grep modulecmd |
| 28 |
# unset-alias al-testsuite |
| 29 |
# setenv testsuite yes |
| 30 |
# append-path testsuite no |
| 31 |
# prepend-path testsuite maybe |
| 32 |
# remove-path testsuite yes |
| 33 |
# unsetenv testsuite |
| 34 |
# xrdb -merge my-prog*my-ress:true |
| 35 |
# module-user advanced |
| 36 |
# module-verbosity on |
| 37 |
# module-log trace local7.info |
| 38 |
# module-trace on |
| 39 |
# system ls |
| 40 |
# module load setenv/1.0 |
| 41 |
# module-alias foo setenv/1.0 |
| 42 |
# module-version foo foo bar blah |
| 43 |
# module-whatis Some checks for HELP and DISPLAY |
| 44 |
# ------------------------------------------------------------------- |
| 45 |
# }R% |
| 46 |
# |
| 47 |
# %R(help){ |
| 48 |
# ----------- Module Specific Help for 'help/2.0' ------------------- |
| 49 |
# |
| 50 |
# Help |
| 51 |
# }R% |
| 52 |
# Comment: %C{ |
| 53 |
# Main purpose of this modulefile is checking if all |
| 54 |
# modulecommands are displayed proper and if none |
| 55 |
# of them are executed in help mode. |
| 56 |
# }C% |
| 57 |
# |
| 58 |
############################################################################## |
| 59 |
|
| 60 |
# |
| 61 |
# That's what's gonna be tested |
| 62 |
# |
| 63 |
|
| 64 |
proc ModulesHelp { } { |
| 65 |
puts stderr Help_out |
| 66 |
puts stderr Help_err |
| 67 |
} |
| 68 |
|
| 69 |
# |
| 70 |
# The following should lead to no result in M_HELP mode |
| 71 |
# |
| 72 |
|
| 73 |
set-alias al-testsuite "ps -auxww | grep modulecmd" |
| 74 |
unset-alias al-testsuite |
| 75 |
|
| 76 |
setenv testsuite yes |
| 77 |
append-path testsuite no |
| 78 |
prepend-path testsuite maybe |
| 79 |
remove-path testsuite yes |
| 80 |
unsetenv testsuite |
| 81 |
|
| 82 |
x-resource my-prog*my-ress:true |
| 83 |
|
| 84 |
module-user advanced |
| 85 |
module-verbosity on |
| 86 |
module-log trace local7.info |
| 87 |
module-trace on |
| 88 |
|
| 89 |
system ls |
| 90 |
|
| 91 |
module load setenv/1.0 |
| 92 |
|
| 93 |
module-alias foo setenv/1.0 |
| 94 |
module-version foo foo bar blah |
| 95 |
|
| 96 |
# |
| 97 |
# Don't corrupt the 'apropos' tests ... |
| 98 |
# |
| 99 |
|
| 100 |
if { ![module-info mode whatis] } { |
| 101 |
module-whatis "Some checks for HELP and DISPLAY" |
| 102 |
} |