| 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: 2012/10/29 |
| 8 |
# Last Mod.: %U%, %G% |
| 9 |
# |
| 10 |
# Authors: R.K. Owen, <[email protected]> |
| 11 |
# |
| 12 |
# Description: Testuite testsequence |
| 13 |
# Command: load |
| 14 |
# Modulefiles: prepend/1.0 prepend/1.1 |
| 15 |
# Sub-Command: |
| 16 |
# |
| 17 |
# Comment: %C{ |
| 18 |
# Tests the 'prepend-path' module subcommand with |
| 19 |
# an arbitrary delimiter and a module swap |
| 20 |
# }C% |
| 21 |
# |
| 22 |
############################################################################## |
| 23 |
|
| 24 |
skip_if_quick_mode |
| 25 |
|
| 26 |
# |
| 27 |
# Variables. This test forces a module load command. It will result in the |
| 28 |
# environment variables "_LMFILES_", "LOADEDMODULES" and "testsuite" to |
| 29 |
# be set up |
| 30 |
# |
| 31 |
|
| 32 |
set ts_1 "http://foobar.org" |
| 33 |
set ts_2 "http://foobar.net" |
| 34 |
set ts_3 "http://foobar.com" |
| 35 |
set ts_4 "http://foobar.us" |
| 36 |
set ts_space "$ts_4 $ts_1 $ts_2" |
| 37 |
set env(testsuite) "$ts_3 $ts_1 $ts_2" |
| 38 |
set module "prepend/1.0" |
| 39 |
set module_new "prepend/1.1" |
| 40 |
set modulefile "$modpath/$module" |
| 41 |
set modulefile_new "$modpath/$module_new" |
| 42 |
|
| 43 |
setenv_loaded_module $module $modulefile |
| 44 |
|
| 45 |
# |
| 46 |
# For the different shells ... |
| 47 |
# |
| 48 |
|
| 49 |
lappend ans [list set _LMFILES_ $modulefile_new] |
| 50 |
lappend ans [list set LOADEDMODULES $module_new] |
| 51 |
lappend ans [list set testsuite $ts_space] |
| 52 |
|
| 53 |
# |
| 54 |
# The tests |
| 55 |
# |
| 56 |
|
| 57 |
test_cmd_re "ALL" "swap $module_new" $ans |
| 58 |
|
| 59 |
# |
| 60 |
# Cleanup |
| 61 |
# |
| 62 |
|
| 63 |
reset_test_env |