Debian Codegraph @

testsuite/modules.50-cmds/110-verbose.exp

raw
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: 1995/12/06
8 # Last Mod.: %U%, %G%
9 #
10 # Authors: Jens Hamisch, [email protected]
11 #
12 # Description: Testuite testsequence
13 # Command: load
14 # Modulefiles: verbose/on, verbose/off, verbose/undef
15 # Sub-Command:
16 #
17 # Comment: %C{
18 # Tests the module verbosity command. This testcase
19 # concerns switching verbosity on and off. It also
20 # checks bad arguments to the 'module-verbosity'
21 # command.
22 # }C%
23 #
24 ##############################################################################
25
26 skip_if_quick_mode
27
28 # ensure auto symbolic versions are not set for these tests
29 setenv_var MODULES_ADVANCED_VERSION_SPEC 0
30
31 #
32 # Variables. This test forces a module load command. It will result in the
33 # environment variables "_LMFILES_", "LOADEDMODULES" and "testsuite" to
34 # be set up
35 #
36
37 set module_1 "verbose/on"
38 set modulefile_1 "$modpath/$module_1"
39
40 set module_2 "verbose/off"
41 set modulefile_2 "$modpath/$module_2"
42
43 set module_3 "verbose/undef"
44 set modulefile_3 "$modpath/$module_3"
45
46 set err_verb "$warn_msgs: 'module-verbosity' command not implemented"
47
48 #
49 # The tests
50 #
51
52 # different behavior than C-version: on Tcl-version 'module-verbosity' command is
53 # not handled and will always return a warning message to inform the user.
54 lappend ans [list set _LMFILES_ $modulefile_1]
55 lappend ans [list set LOADEDMODULES $module_1]
56 testouterr_cmd "csh" "load $module_1" $ans [msg_load $module_1 $err_verb]
57
58 set ans [list]
59 lappend ans [list set _LMFILES_ $modulefile_2]
60 lappend ans [list set LOADEDMODULES $module_2]
61 testouterr_cmd "csh" "load $module_2" $ans [msg_load $module_2 $err_verb]
62
63 set ans [list]
64 lappend ans [list set _LMFILES_ $modulefile_3]
65 lappend ans [list set LOADEDMODULES $module_3]
66 testouterr_cmd "csh" "load $module_3" $ans [msg_load $module_3 $err_verb]
67
68 #
69 # Cleanup
70 #
71
72 reset_test_env