Debian Codegraph @

testsuite/modules.90-avail/020-single.exp

raw
1 ##############################################################################
2 # Modules Revision 3.0
3 # Providing a flexible user environment
4 #
5 # File: modules.90-avail/%M%
6 # Revision: %I%
7 # First Edition: 95/12/06
8 # Last Mod.: %U%, %G%
9 #
10 # Authors: Jens Hamisch, [email protected]
11 #
12 # Description: Testuite testsequence
13 # Command: avail
14 # Modulefiles: help/2.0, loc_rc6/bar, loc_rc1/1.0
15 # Sub-Command:
16 #
17 # Comment: %C{
18 # Check the module 'avail' command for a full qualified
19 # module name in terse output mode.
20 # }C%
21 #
22 ##############################################################################
23
24 # ensure avail tests are made using in depth mode
25 setenv_var MODULES_AVAIL_INDEPTH 1
26
27 # ensure regular avail search match is set for these tests
28 setenv_var MODULES_SEARCH_MATCH starts_with
29
30 set module "help"
31 set version "2.0"
32 set module2 "loc_rc6"
33 set alias2 "bar"
34 set module3 "loc_rc1"
35 set version3 "1.0"
36 set symbol3 "foo"
37
38 set key_al "Key:
39 \\(@\\)=module-alias"
40 set key_sym "Key:
41 \\(symbolic-version\\)"
42
43 #
44 # Check this only for the /bin/csh
45 #
46
47 set header "$modlin $modpathre $modlin\n"
48 set ts_csh "$header$module/$version"
49
50 #
51 # The tests
52 #
53
54 testouterr_cmd_re "csh" "avail $module/$version" "OK" "$ts_csh"
55 testouterr_cmd_re "csh" "avail $module" "OK" "$ts_csh"
56
57 # command nickname tests
58 testouterr_cmd_re "csh" "av $module" "OK" "$ts_csh"
59
60 skip_if_quick_mode
61
62 #
63 # Test avail on an alias module
64 #
65
66 set ts_csh "$header$module2/$alias2\\(@\\)"
67 testouterr_cmd_re "csh" "avail $module2/$alias2" "OK" "$ts_csh\n\n$key_al"
68
69 #
70 # Test avail on a symbolic version
71 #
72
73 set ts_csh "$header$module3/$version3\\($symbol3\\)"
74 testouterr_cmd_re "csh" "avail $module3/$symbol3" "OK" "$ts_csh\n\n$key_sym"
75
76 #
77 # test when loaded environment is inconsistent
78 #
79
80 setenv_loaded_module [list foo bar] "/path/to/foo"
81
82 set ts_csh "$err_loinconsist
83 LOADEDMODULES=foo bar
84 _LMFILES_=/path/to/foo"
85 testouterr_cmd_re "csh" "avail $module3/$symbol3" ERR $ts_csh
86
87
88 #
89 # Cleanup
90 #
91
92 reset_test_env