Debian Codegraph @

testsuite/modules.50-cmds/086-info-shells.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: info/shells
15 # Sub-Command:
16 #
17 # Comment: %C{
18 # Tests the 'module-info shell' and the 'module-info
19 # shelltype' module subcommands with own suggestion.
20 # }C%
21 #
22 ##############################################################################
23
24 #
25 # Variables. This test forces a module load command. It will result in the
26 # environment variables "_LMFILES_", "LOADEDMODULES" and "testsuite" to
27 # be set up
28 #
29
30 set module "info/shells"
31 set modulefile "$modpath/$module"
32
33 #
34 # The tests
35 #
36
37 foreach sh $supported_shells {
38 switch -- $sh {
39 {sh} - {bash} - {ksh} - {zsh} {
40 set shtype "sh"
41 }
42 {csh} - {tcsh} {
43 set shtype "csh"
44 }
45 default {
46 set shtype $sh
47 }
48 }
49 set ans [list]
50 lappend ans [list set _LMFILES_ $modulefile]
51 lappend ans [list set LOADEDMODULES $module]
52 lappend ans [list set testsuite "$sh/$shtype"]
53
54 test_cmd "$sh" "load $module" $ans
55 }
56
57 #
58 # Cleanup
59 #
60
61 reset_test_env