ATOMS: Add tests
[scilab.git] / scilab / modules / atoms / tests / unit_tests / atomsInstall.tst
1 // =============================================================================
2 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 // Copyright (C) 2009 - DIGITEO - Pierre MARECHAL <pierre.marechal@scilab.org>
4 //
5 //  This file is distributed under the same license as the Scilab package.
6 // =============================================================================
7
8 // <-- JVM NOT MANDATORY -->
9
10 load("SCI/modules/atoms/macros/atoms_internals/lib");
11
12 // Load the 1st scenario : See scene1.test.atoms.scilab.org.txt
13 atomsRepositorySetOfl("http://scene1.test.atoms.scilab.org");
14
15 // Do not use the autoload system
16 config_autoload = atomsGetConfig("autoload");
17 atomsSetConfig("autoload","False");
18
19
20 // Install the toolbox 5
21 // =============================================================================
22
23 atomsInstall("toolbox_5");
24
25 // Check if the module is really installed
26 if ~atomsIsInstalled("toolbox_5") then pause, end
27 if ~atomsIsInstalled("toolbox_4") then pause, end
28 if ~atomsIsInstalled("toolbox_2") then pause, end
29 if ~atomsIsInstalled("toolbox_1") then pause, end
30
31 // Remove the module
32 atomsRemove("toolbox_5");
33
34 // Install the toolbox 5 (user section)
35 // =============================================================================
36
37 atomsInstall("toolbox_5","user");
38
39 if ~atomsIsInstalled("toolbox_5","user") then pause, end
40 if ~atomsIsInstalled("toolbox_4","user") then pause, end
41 if ~atomsIsInstalled("toolbox_2","user") then pause, end
42 if ~atomsIsInstalled("toolbox_1","user") then pause, end
43
44 if atomsIsInstalled("toolbox_5","allusers") then pause, end
45 if atomsIsInstalled("toolbox_4","allusers") then pause, end
46 if atomsIsInstalled("toolbox_2","allusers") then pause, end
47 if atomsIsInstalled("toolbox_1","allusers") then pause, end
48
49 atomsRemove("toolbox_5","user");
50
51 if atomsIsInstalled("toolbox_5","user") then pause, end
52 if atomsIsInstalled("toolbox_4","user") then pause, end
53 if atomsIsInstalled("toolbox_2","user") then pause, end
54 if atomsIsInstalled("toolbox_1","user") then pause, end
55
56 // Install the toolbox 5 (allusers section)
57 // =============================================================================
58
59 atomsInstall("toolbox_5","allusers");
60
61 if ~atomsIsInstalled("toolbox_5","allusers") then pause, end
62 if ~atomsIsInstalled("toolbox_4","allusers") then pause, end
63 if ~atomsIsInstalled("toolbox_2","allusers") then pause, end
64 if ~atomsIsInstalled("toolbox_1","allusers") then pause, end
65
66 if atomsIsInstalled("toolbox_5","user") then pause, end
67 if atomsIsInstalled("toolbox_4","user") then pause, end
68 if atomsIsInstalled("toolbox_2","user") then pause, end
69 if atomsIsInstalled("toolbox_1","user") then pause, end
70
71 atomsRemove("toolbox_5","allusers");
72
73 if atomsIsInstalled("toolbox_5","allusers") then pause, end
74 if atomsIsInstalled("toolbox_4","allusers") then pause, end
75 if atomsIsInstalled("toolbox_2","allusers") then pause, end
76 if atomsIsInstalled("toolbox_1","allusers") then pause, end
77
78 // Install the toolbox 5 (Both section)
79 // =============================================================================
80
81 atomsInstall("toolbox_5","allusers");
82 atomsInstall("toolbox_5","user");
83
84 if ~atomsIsInstalled("toolbox_5","allusers") then pause, end
85 if ~atomsIsInstalled("toolbox_4","allusers") then pause, end
86 if ~atomsIsInstalled("toolbox_2","allusers") then pause, end
87 if ~atomsIsInstalled("toolbox_1","allusers") then pause, end
88
89 if ~atomsIsInstalled("toolbox_5","user") then pause, end
90 if ~atomsIsInstalled("toolbox_4","user") then pause, end
91 if ~atomsIsInstalled("toolbox_2","user") then pause, end
92 if ~atomsIsInstalled("toolbox_1","user") then pause, end
93
94 atomsRemove("toolbox_5","allusers");
95 if atomsIsInstalled("toolbox_5","allusers") then pause, end
96 if atomsIsInstalled("toolbox_4","allusers") then pause, end
97 if atomsIsInstalled("toolbox_2","allusers") then pause, end
98 if atomsIsInstalled("toolbox_1","allusers") then pause, end
99
100 if ~atomsIsInstalled("toolbox_5","user") then pause, end
101 if ~atomsIsInstalled("toolbox_4","user") then pause, end
102 if ~atomsIsInstalled("toolbox_2","user") then pause, end
103 if ~atomsIsInstalled("toolbox_1","user") then pause, end
104
105 atomsInstall("toolbox_5","allusers");
106 atomsRemove("toolbox_5","user");
107
108 if atomsIsInstalled("toolbox_5","user") then pause, end
109 if atomsIsInstalled("toolbox_4","user") then pause, end
110 if atomsIsInstalled("toolbox_2","user") then pause, end
111 if atomsIsInstalled("toolbox_1","user") then pause, end
112
113 if ~atomsIsInstalled("toolbox_5","allusers") then pause, end
114 if ~atomsIsInstalled("toolbox_4","allusers") then pause, end
115 if ~atomsIsInstalled("toolbox_2","allusers") then pause, end
116 if ~atomsIsInstalled("toolbox_1","allusers") then pause, end
117
118 atomsRemove("toolbox_5","allusers");
119
120 // Restore original values
121 atomsSetConfig("autoload",config_autoload);
122 atomsRepositorySetOfl("http://atoms.scilab.org");