| 1 |
############################################################################## |
| 2 |
# Modules Revision 3.0 |
| 3 |
# Providing a flexible user environment |
| 4 |
# |
| 5 |
# File: modules.60-initx/%M% |
| 6 |
# Revision: %I% |
| 7 |
# First Edition: 2006/01/12 |
| 8 |
# Last Mod.: %U%, %G% |
| 9 |
# |
| 10 |
# Authors: R.K. Owen, [email protected] |
| 11 |
# |
| 12 |
# Description: Testuite testsequence |
| 13 |
# Command: initadd, initrm |
| 14 |
# Modulefiles: |
| 15 |
# Sub-Command: |
| 16 |
# |
| 17 |
# Comment: %C{ |
| 18 |
# Check the init* sub-commands working on the |
| 19 |
# 2nd module load line |
| 20 |
# }C% |
| 21 |
# |
| 22 |
############################################################################## |
| 23 |
|
| 24 |
skip_if_quick_mode |
| 25 |
|
| 26 |
# |
| 27 |
# restore the .modules file (again) |
| 28 |
# |
| 29 |
file copy -force "$env(HOME)/.modules.save" "$env(HOME)/.modules" |
| 30 |
|
| 31 |
testouterr_cmd sh "initrm modules" "OK" "" |
| 32 |
_test_modules sh "initrm" "$modload null\n$line2x" |
| 33 |
|
| 34 |
testouterr_cmd sh "initadd modules" "OK" "" |
| 35 |
_test_modules sh "initrm" "$modload null modules\n$line2x" |
| 36 |
|
| 37 |
# different behavior than C-version: on Tcl-version no message is printed |
| 38 |
testouterr_cmd sh "initadd dot" "OK" "" |
| 39 |
_test_modules sh "initadd" "$modload null modules dot\n$modload module-cvs module-info use.own" |
| 40 |
|
| 41 |
testouterr_cmd sh "initpre use.own" "OK" "" |
| 42 |
_test_modules sh "initprepend" "$modload use.own null modules dot\n$modload module-cvs module-info" |
| 43 |
|
| 44 |
testouterr_cmd sh "initswitch module-info info-module" "OK" "" |
| 45 |
_test_modules sh "initswitch" "$modload use.own null modules dot\n$modload module-cvs info-module" |
| 46 |
|
| 47 |
# different behavior than C-version: on Tcl-version 'module load' lines are left |
| 48 |
# instead of 'module load null' lines |
| 49 |
testouterr_cmd sh "initclear" "OK" "" |
| 50 |
_test_modules sh "initclear" "$modload\n$modload" |
| 51 |
|
| 52 |
# test on fully empty init file |
| 53 |
file copy -force "$env(HOME)/.modules.savenull" "$env(HOME)/.modules" |
| 54 |
|
| 55 |
testouterr_cmd sh "initclear" "ERR" "$find_msg_sh" |
| 56 |
_test_modules sh "initclear" "#" |