Debian Codegraph @

testsuite/modules.60-initx/050-rm.exp

raw
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 initrm sub-command
19 # }C%
20 #
21 ##############################################################################
22
23 skip_if_quick_mode
24
25 testouterr_cmd sh "initrm foobar" "OK" ""
26 _test_modules sh "initrm" "$modload poo/2.0 foo bar null\n$line2"
27
28 testouterr_cmd ksh "initrm foo bar" "OK" ""
29 _test_modules ksh "initrm" "$modload poo/2.0 null\n$line2"
30
31 testouterr_cmd zsh "initunlo poo/2.0" "OK" ""
32 _test_modules zsh "initrm" "$modload null\n$line2"
33
34 # not there
35 testouterr_cmd csh "initrm foobar" "OK" ""
36 _test_modules csh "initrm" "$modload null\n$line2"
37
38 # go too far
39 # different behavior than C-version: on Tcl-version a 'module load' line is left
40 # instead of a 'module load null' line
41 testouterr_cmd tcsh "initrm null" "OK" ""
42 _test_modules tcsh "initrm" "$modload\n$line2"
43
44 # test on fully empty init file
45 file copy -force "$env(HOME)/.modules.savenull" "$env(HOME)/.modules"
46
47 testouterr_cmd sh "initrm foobar" "ERR" "$find_msg_sh"
48 _test_modules sh "initrm" "#"