| 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: 2005/12/22 |
| 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 initadd sub-commands |
| 19 |
# }C% |
| 20 |
# |
| 21 |
############################################################################## |
| 22 |
|
| 23 |
skip_if_quick_mode |
| 24 |
|
| 25 |
# test on empty module load list |
| 26 |
file copy -force "$env(HOME)/.modules.saveempty" "$env(HOME)/.modules" |
| 27 |
|
| 28 |
testouterr_cmd sh "initadd foobar" "OK" "" |
| 29 |
_test_modules sh "initadd" "$modload foobar" |
| 30 |
|
| 31 |
|
| 32 |
# test on fully empty init file |
| 33 |
file copy -force "$env(HOME)/.modules.savenull" "$env(HOME)/.modules" |
| 34 |
|
| 35 |
testouterr_cmd sh "initadd foobar" "ERR" "$find_msg_sh" |
| 36 |
_test_modules sh "initadd" "#" |
| 37 |
|
| 38 |
|
| 39 |
# restore regular .modules file for test |
| 40 |
file copy -force "$env(HOME)/.modules.save" "$env(HOME)/.modules" |
| 41 |
|
| 42 |
testouterr_cmd sh "initlo foobar" "OK" "" |
| 43 |
_test_modules sh "initadd" "$modload null foobar\n$line2" |
| 44 |
|
| 45 |
testouterr_cmd ksh "initad foo bar" "OK" "" |
| 46 |
_test_modules ksh "initadd" "$modload null foobar foo bar\n$line2" |
| 47 |
|
| 48 |
testouterr_cmd zsh "inita poo/2.0" "OK" "" |
| 49 |
_test_modules zsh "initadd" "$modload null foobar foo bar poo/2.0\n$line2" |
| 50 |
|
| 51 |
# different behavior than C-version: on Tcl-version no message is printed |
| 52 |
testouterr_cmd csh "initadd foobar" "OK" "" |
| 53 |
_test_modules csh "initadd" "$modload null foo bar poo/2.0 foobar\n$line2" |
| 54 |
|