Debian Codegraph @

testsuite/modules.50-cmds/320-is-saved.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: 2017/11/27
8 # Last Mod.: %U%, %G%
9 #
10 # Authors: Xavier Delaruelle, [email protected]
11 #
12 # Description: Testuite testsequence
13 # Command: load
14 # Modulefiles: info/issaved
15 # Sub-Command:
16 #
17 # Comment: %C{
18 # Tests the 'is-saved' modulefile subcommand for all
19 # allowed shell types.
20 # }C%
21 #
22 ##############################################################################
23
24 skip_if_quick_mode
25
26 set module "info/issaved"
27 set modulefile "$modpath/$module"
28
29 # set HOME to location containing collections
30 set homewithcoll "$env(HOME)/home"
31 if {$verbose} {
32 send_user "\tSetup HOME = $homewithcoll\n"
33 }
34 set env(HOME) "$homewithcoll"
35
36
37 #
38 # The tests
39 #
40
41 lappend ans [list set testsuite6 1]
42 lappend ans [list set testsuite2 0]
43 lappend ans [list set testsuite7 0]
44 lappend ans [list set testsuite3 0]
45 lappend ans [list set _LMFILES_ $modulefile]
46 lappend ans [list set LOADEDMODULES $module]
47 lappend ans [list set testsuite4 1]
48 lappend ans [list set testsuite5 1]
49 lappend ans [list set testsuite1 1]
50
51 testouterr_cmd "ALL" "load $module" $ans ""
52
53 # define a collection target
54 if {$verbose} {
55 send_user "\tSetup MODULES_COLLECTION_TARGET = 'target'\n"
56 }
57 set env(MODULES_COLLECTION_TARGET) "target"
58
59 set ans [list]
60 lappend ans [list set testsuite6 0]
61 lappend ans [list set testsuite2 0]
62 lappend ans [list set testsuite7 1]
63 lappend ans [list set testsuite3 0]
64 lappend ans [list set _LMFILES_ $modulefile]
65 lappend ans [list set LOADEDMODULES $module]
66 lappend ans [list set testsuite4 0]
67 lappend ans [list set testsuite5 0]
68 lappend ans [list set testsuite1 1]
69
70 testouterr_cmd "ALL" "load $module" $ans ""
71
72 # define a collection target with no collection related to it
73 if {$verbose} {
74 send_user "\tSetup MODULES_COLLECTION_TARGET = 'foo'\n"
75 }
76 set env(MODULES_COLLECTION_TARGET) "foo"
77
78 set ans [list]
79 lappend ans [list set testsuite6 0]
80 lappend ans [list set testsuite2 0]
81 lappend ans [list set testsuite7 0]
82 lappend ans [list set testsuite3 0]
83 lappend ans [list set _LMFILES_ $modulefile]
84 lappend ans [list set LOADEDMODULES $module]
85 lappend ans [list set testsuite4 0]
86 lappend ans [list set testsuite5 0]
87 lappend ans [list set testsuite1 0]
88
89 testouterr_cmd "sh" "load $module" $ans ""
90
91
92 #
93 # Cleanup
94 #
95
96 reset_test_env