Debian Codegraph @

testsuite/modules.92-spider/020-spider-single.exp

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