Debian Codegraph @

testsuite/modules.60-initx/040-prepend.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 initprepend sub-commands
19 # }C%
20 #
21 ##############################################################################
22
23 skip_if_quick_mode
24
25 # test on fully empty init file
26 file copy -force "$env(HOME)/.modules.savenull" "$env(HOME)/.modules"
27
28 testouterr_cmd sh "initprepend foobar" "ERR" "$find_msg_sh"
29 _test_modules sh "initprepend" "#"
30
31 #
32 # restore the .modules file (again)
33 #
34 file copy -force "$env(HOME)/.modules.save" "$env(HOME)/.modules"
35
36 testouterr_cmd sh "initprepend foobar" "OK" ""
37 _test_modules sh "initprepend" "$modload foobar null\n$line2"
38
39 testouterr_cmd ksh "initpre foo bar" "OK" ""
40 _test_modules ksh "initprepend" "$modload foo bar foobar null\n$line2"
41
42 testouterr_cmd zsh "initpr poo/2.0" "OK" ""
43 _test_modules zsh "initprepend" "$modload poo/2.0 foo bar foobar null\n$line2"
44
45 # different behavior than C-version: on Tcl-version no message is printed
46 testouterr_cmd csh "initp foobar" "OK" ""
47 _test_modules csh "initprepend" "$modload foobar poo/2.0 foo bar null\n$line2"
48