| 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: 1995/12/06 |
| 8 |
# Last Mod.: %U%, %G% |
| 9 |
# |
| 10 |
# Authors: Jens Hamisch, [email protected] |
| 11 |
# |
| 12 |
# Description: Testuite testsequence |
| 13 |
# Command: load |
| 14 |
# Modulefiles: info/user |
| 15 |
# Sub-Command: |
| 16 |
# |
| 17 |
# Comment: %C{ |
| 18 |
# Tests the 'module-info user' module subcommand with- |
| 19 |
# out own suggestion. |
| 20 |
# This command does not change behaviour depending on |
| 21 |
# the user shell. Tests are made for the bourne shell |
| 22 |
# here. |
| 23 |
# }C% |
| 24 |
# |
| 25 |
############################################################################## |
| 26 |
|
| 27 |
skip_if_quick_mode |
| 28 |
|
| 29 |
# |
| 30 |
# Variables. This test forces a module load command. It will result in the |
| 31 |
# environment variables "_LMFILES_", "LOADEDMODULES" and "testsuite" to |
| 32 |
# be set up |
| 33 |
# |
| 34 |
|
| 35 |
set module "info/user" |
| 36 |
set modulefile "$modpath/$module" |
| 37 |
|
| 38 |
# |
| 39 |
# The _LMFILES_ and the LOADEDMODULES will be affected |
| 40 |
# |
| 41 |
|
| 42 |
lappend ans [list set _LMFILES_ $modulefile] |
| 43 |
lappend ans [list set LOADEDMODULES $module] |
| 44 |
lappend ans [list set testsuite ""] |
| 45 |
|
| 46 |
# |
| 47 |
# The tests |
| 48 |
# |
| 49 |
|
| 50 |
# different behavior than C-version: on Tcl-version userlvl is not handled and |
| 51 |
# [module-info user] will always return an empty string. |
| 52 |
|
| 53 |
test_cmd "sh" "load $module" $ans |
| 54 |
|
| 55 |
# |
| 56 |
# Cleanup |
| 57 |
# |
| 58 |
|
| 59 |
reset_test_env |