ATOMS: Add tests
Pierre MARECHAL [Wed, 21 Oct 2009 20:09:19 +0000 (22:09 +0200)]
12 files changed:
scilab/modules/atoms/tests/unit_tests/atomsInstall.dia.ref
scilab/modules/atoms/tests/unit_tests/atomsInstall.tst
scilab/modules/atoms/tests/unit_tests/atomsInstallList.dia.ref [new file with mode: 0644]
scilab/modules/atoms/tests/unit_tests/atomsInstallList.tst [new file with mode: 0644]
scilab/modules/atoms/tests/unit_tests/atomsIsInstalled.dia.ref
scilab/modules/atoms/tests/unit_tests/atomsIsInstalled.tst
scilab/modules/atoms/tests/unit_tests/atomsRemoveList.dia.ref [new file with mode: 0644]
scilab/modules/atoms/tests/unit_tests/atomsRemoveList.tst [new file with mode: 0644]
scilab/modules/atoms/tests/unit_tests/atomsRepositoryDel.dia.ref [new file with mode: 0644]
scilab/modules/atoms/tests/unit_tests/atomsRepositoryDel.tst [new file with mode: 0644]
scilab/modules/atoms/tests/unit_tests/atomsUpdate.dia.ref [new file with mode: 0644]
scilab/modules/atoms/tests/unit_tests/atomsUpdate.tst [new file with mode: 0644]

index aeb1dcd..d01efe2 100644 (file)
@@ -24,66 +24,66 @@ atomsRemove("toolbox_5");
 // Install the toolbox 5 (user section)
 // =============================================================================
 atomsInstall("toolbox_5","user");
-if ~atomsIsInstalled("toolbox_5",[],"user") then bugmes();quit;end
-if ~atomsIsInstalled("toolbox_4",[],"user") then bugmes();quit;end
-if ~atomsIsInstalled("toolbox_2",[],"user") then bugmes();quit;end
-if ~atomsIsInstalled("toolbox_1",[],"user") then bugmes();quit;end
-if atomsIsInstalled("toolbox_5",[],"allusers") then bugmes();quit;end
-if atomsIsInstalled("toolbox_4",[],"allusers") then bugmes();quit;end
-if atomsIsInstalled("toolbox_2",[],"allusers") then bugmes();quit;end
-if atomsIsInstalled("toolbox_1",[],"allusers") then bugmes();quit;end
+if ~atomsIsInstalled("toolbox_5","user") then bugmes();quit;end
+if ~atomsIsInstalled("toolbox_4","user") then bugmes();quit;end
+if ~atomsIsInstalled("toolbox_2","user") then bugmes();quit;end
+if ~atomsIsInstalled("toolbox_1","user") then bugmes();quit;end
+if atomsIsInstalled("toolbox_5","allusers") then bugmes();quit;end
+if atomsIsInstalled("toolbox_4","allusers") then bugmes();quit;end
+if atomsIsInstalled("toolbox_2","allusers") then bugmes();quit;end
+if atomsIsInstalled("toolbox_1","allusers") then bugmes();quit;end
 atomsRemove("toolbox_5","user");
-if atomsIsInstalled("toolbox_5",[],"user") then bugmes();quit;end
-if atomsIsInstalled("toolbox_4",[],"user") then bugmes();quit;end
-if atomsIsInstalled("toolbox_2",[],"user") then bugmes();quit;end
-if atomsIsInstalled("toolbox_1",[],"user") then bugmes();quit;end
+if atomsIsInstalled("toolbox_5","user") then bugmes();quit;end
+if atomsIsInstalled("toolbox_4","user") then bugmes();quit;end
+if atomsIsInstalled("toolbox_2","user") then bugmes();quit;end
+if atomsIsInstalled("toolbox_1","user") then bugmes();quit;end
 // Install the toolbox 5 (allusers section)
 // =============================================================================
 atomsInstall("toolbox_5","allusers");
-if ~atomsIsInstalled("toolbox_5",[],"allusers") then bugmes();quit;end
-if ~atomsIsInstalled("toolbox_4",[],"allusers") then bugmes();quit;end
-if ~atomsIsInstalled("toolbox_2",[],"allusers") then bugmes();quit;end
-if ~atomsIsInstalled("toolbox_1",[],"allusers") then bugmes();quit;end
-if atomsIsInstalled("toolbox_5",[],"user") then bugmes();quit;end
-if atomsIsInstalled("toolbox_4",[],"user") then bugmes();quit;end
-if atomsIsInstalled("toolbox_2",[],"user") then bugmes();quit;end
-if atomsIsInstalled("toolbox_1",[],"user") then bugmes();quit;end
+if ~atomsIsInstalled("toolbox_5","allusers") then bugmes();quit;end
+if ~atomsIsInstalled("toolbox_4","allusers") then bugmes();quit;end
+if ~atomsIsInstalled("toolbox_2","allusers") then bugmes();quit;end
+if ~atomsIsInstalled("toolbox_1","allusers") then bugmes();quit;end
+if atomsIsInstalled("toolbox_5","user") then bugmes();quit;end
+if atomsIsInstalled("toolbox_4","user") then bugmes();quit;end
+if atomsIsInstalled("toolbox_2","user") then bugmes();quit;end
+if atomsIsInstalled("toolbox_1","user") then bugmes();quit;end
 atomsRemove("toolbox_5","allusers");
-if atomsIsInstalled("toolbox_5",[],"allusers") then bugmes();quit;end
-if atomsIsInstalled("toolbox_4",[],"allusers") then bugmes();quit;end
-if atomsIsInstalled("toolbox_2",[],"allusers") then bugmes();quit;end
-if atomsIsInstalled("toolbox_1",[],"allusers") then bugmes();quit;end
+if atomsIsInstalled("toolbox_5","allusers") then bugmes();quit;end
+if atomsIsInstalled("toolbox_4","allusers") then bugmes();quit;end
+if atomsIsInstalled("toolbox_2","allusers") then bugmes();quit;end
+if atomsIsInstalled("toolbox_1","allusers") then bugmes();quit;end
 // Install the toolbox 5 (Both section)
 // =============================================================================
 atomsInstall("toolbox_5","allusers");
 atomsInstall("toolbox_5","user");
-if ~atomsIsInstalled("toolbox_5",[],"allusers") then bugmes();quit;end
-if ~atomsIsInstalled("toolbox_4",[],"allusers") then bugmes();quit;end
-if ~atomsIsInstalled("toolbox_2",[],"allusers") then bugmes();quit;end
-if ~atomsIsInstalled("toolbox_1",[],"allusers") then bugmes();quit;end
-if ~atomsIsInstalled("toolbox_5",[],"user") then bugmes();quit;end
-if ~atomsIsInstalled("toolbox_4",[],"user") then bugmes();quit;end
-if ~atomsIsInstalled("toolbox_2",[],"user") then bugmes();quit;end
-if ~atomsIsInstalled("toolbox_1",[],"user") then bugmes();quit;end
+if ~atomsIsInstalled("toolbox_5","allusers") then bugmes();quit;end
+if ~atomsIsInstalled("toolbox_4","allusers") then bugmes();quit;end
+if ~atomsIsInstalled("toolbox_2","allusers") then bugmes();quit;end
+if ~atomsIsInstalled("toolbox_1","allusers") then bugmes();quit;end
+if ~atomsIsInstalled("toolbox_5","user") then bugmes();quit;end
+if ~atomsIsInstalled("toolbox_4","user") then bugmes();quit;end
+if ~atomsIsInstalled("toolbox_2","user") then bugmes();quit;end
+if ~atomsIsInstalled("toolbox_1","user") then bugmes();quit;end
 atomsRemove("toolbox_5","allusers");
-if atomsIsInstalled("toolbox_5",[],"allusers") then bugmes();quit;end
-if atomsIsInstalled("toolbox_4",[],"allusers") then bugmes();quit;end
-if atomsIsInstalled("toolbox_2",[],"allusers") then bugmes();quit;end
-if atomsIsInstalled("toolbox_1",[],"allusers") then bugmes();quit;end
-if ~atomsIsInstalled("toolbox_5",[],"user") then bugmes();quit;end
-if ~atomsIsInstalled("toolbox_4",[],"user") then bugmes();quit;end
-if ~atomsIsInstalled("toolbox_2",[],"user") then bugmes();quit;end
-if ~atomsIsInstalled("toolbox_1",[],"user") then bugmes();quit;end
+if atomsIsInstalled("toolbox_5","allusers") then bugmes();quit;end
+if atomsIsInstalled("toolbox_4","allusers") then bugmes();quit;end
+if atomsIsInstalled("toolbox_2","allusers") then bugmes();quit;end
+if atomsIsInstalled("toolbox_1","allusers") then bugmes();quit;end
+if ~atomsIsInstalled("toolbox_5","user") then bugmes();quit;end
+if ~atomsIsInstalled("toolbox_4","user") then bugmes();quit;end
+if ~atomsIsInstalled("toolbox_2","user") then bugmes();quit;end
+if ~atomsIsInstalled("toolbox_1","user") then bugmes();quit;end
 atomsInstall("toolbox_5","allusers");
 atomsRemove("toolbox_5","user");
-if atomsIsInstalled("toolbox_5",[],"user") then bugmes();quit;end
-if atomsIsInstalled("toolbox_4",[],"user") then bugmes();quit;end
-if atomsIsInstalled("toolbox_2",[],"user") then bugmes();quit;end
-if atomsIsInstalled("toolbox_1",[],"user") then bugmes();quit;end
-if ~atomsIsInstalled("toolbox_5",[],"allusers") then bugmes();quit;end
-if ~atomsIsInstalled("toolbox_4",[],"allusers") then bugmes();quit;end
-if ~atomsIsInstalled("toolbox_2",[],"allusers") then bugmes();quit;end
-if ~atomsIsInstalled("toolbox_1",[],"allusers") then bugmes();quit;end
+if atomsIsInstalled("toolbox_5","user") then bugmes();quit;end
+if atomsIsInstalled("toolbox_4","user") then bugmes();quit;end
+if atomsIsInstalled("toolbox_2","user") then bugmes();quit;end
+if atomsIsInstalled("toolbox_1","user") then bugmes();quit;end
+if ~atomsIsInstalled("toolbox_5","allusers") then bugmes();quit;end
+if ~atomsIsInstalled("toolbox_4","allusers") then bugmes();quit;end
+if ~atomsIsInstalled("toolbox_2","allusers") then bugmes();quit;end
+if ~atomsIsInstalled("toolbox_1","allusers") then bugmes();quit;end
 atomsRemove("toolbox_5","allusers");
 // Restore original values
 atomsSetConfig("autoload",config_autoload);
index 18a30ad..3f104e4 100644 (file)
@@ -17,8 +17,6 @@ config_autoload = atomsGetConfig("autoload");
 atomsSetConfig("autoload","False");
 
 
-
-
 // Install the toolbox 5
 // =============================================================================
 
@@ -37,38 +35,45 @@ atomsRemove("toolbox_5");
 // =============================================================================
 
 atomsInstall("toolbox_5","user");
-if ~atomsIsInstalled("toolbox_5",[],"user") then pause, end
-if ~atomsIsInstalled("toolbox_4",[],"user") then pause, end
-if ~atomsIsInstalled("toolbox_2",[],"user") then pause, end
-if ~atomsIsInstalled("toolbox_1",[],"user") then pause, end
-if atomsIsInstalled("toolbox_5",[],"allusers") then pause, end
-if atomsIsInstalled("toolbox_4",[],"allusers") then pause, end
-if atomsIsInstalled("toolbox_2",[],"allusers") then pause, end
-if atomsIsInstalled("toolbox_1",[],"allusers") then pause, end
+
+if ~atomsIsInstalled("toolbox_5","user") then pause, end
+if ~atomsIsInstalled("toolbox_4","user") then pause, end
+if ~atomsIsInstalled("toolbox_2","user") then pause, end
+if ~atomsIsInstalled("toolbox_1","user") then pause, end
+
+if atomsIsInstalled("toolbox_5","allusers") then pause, end
+if atomsIsInstalled("toolbox_4","allusers") then pause, end
+if atomsIsInstalled("toolbox_2","allusers") then pause, end
+if atomsIsInstalled("toolbox_1","allusers") then pause, end
+
 atomsRemove("toolbox_5","user");
-if atomsIsInstalled("toolbox_5",[],"user") then pause, end
-if atomsIsInstalled("toolbox_4",[],"user") then pause, end
-if atomsIsInstalled("toolbox_2",[],"user") then pause, end
-if atomsIsInstalled("toolbox_1",[],"user") then pause, end
 
+if atomsIsInstalled("toolbox_5","user") then pause, end
+if atomsIsInstalled("toolbox_4","user") then pause, end
+if atomsIsInstalled("toolbox_2","user") then pause, end
+if atomsIsInstalled("toolbox_1","user") then pause, end
 
 // Install the toolbox 5 (allusers section)
 // =============================================================================
 
 atomsInstall("toolbox_5","allusers");
-if ~atomsIsInstalled("toolbox_5",[],"allusers") then pause, end
-if ~atomsIsInstalled("toolbox_4",[],"allusers") then pause, end
-if ~atomsIsInstalled("toolbox_2",[],"allusers") then pause, end
-if ~atomsIsInstalled("toolbox_1",[],"allusers") then pause, end
-if atomsIsInstalled("toolbox_5",[],"user") then pause, end
-if atomsIsInstalled("toolbox_4",[],"user") then pause, end
-if atomsIsInstalled("toolbox_2",[],"user") then pause, end
-if atomsIsInstalled("toolbox_1",[],"user") then pause, end
+
+if ~atomsIsInstalled("toolbox_5","allusers") then pause, end
+if ~atomsIsInstalled("toolbox_4","allusers") then pause, end
+if ~atomsIsInstalled("toolbox_2","allusers") then pause, end
+if ~atomsIsInstalled("toolbox_1","allusers") then pause, end
+
+if atomsIsInstalled("toolbox_5","user") then pause, end
+if atomsIsInstalled("toolbox_4","user") then pause, end
+if atomsIsInstalled("toolbox_2","user") then pause, end
+if atomsIsInstalled("toolbox_1","user") then pause, end
+
 atomsRemove("toolbox_5","allusers");
-if atomsIsInstalled("toolbox_5",[],"allusers") then pause, end
-if atomsIsInstalled("toolbox_4",[],"allusers") then pause, end
-if atomsIsInstalled("toolbox_2",[],"allusers") then pause, end
-if atomsIsInstalled("toolbox_1",[],"allusers") then pause, end
+
+if atomsIsInstalled("toolbox_5","allusers") then pause, end
+if atomsIsInstalled("toolbox_4","allusers") then pause, end
+if atomsIsInstalled("toolbox_2","allusers") then pause, end
+if atomsIsInstalled("toolbox_1","allusers") then pause, end
 
 // Install the toolbox 5 (Both section)
 // =============================================================================
@@ -76,39 +81,41 @@ if atomsIsInstalled("toolbox_1",[],"allusers") then pause, end
 atomsInstall("toolbox_5","allusers");
 atomsInstall("toolbox_5","user");
 
-if ~atomsIsInstalled("toolbox_5",[],"allusers") then pause, end
-if ~atomsIsInstalled("toolbox_4",[],"allusers") then pause, end
-if ~atomsIsInstalled("toolbox_2",[],"allusers") then pause, end
-if ~atomsIsInstalled("toolbox_1",[],"allusers") then pause, end
-if ~atomsIsInstalled("toolbox_5",[],"user") then pause, end
-if ~atomsIsInstalled("toolbox_4",[],"user") then pause, end
-if ~atomsIsInstalled("toolbox_2",[],"user") then pause, end
-if ~atomsIsInstalled("toolbox_1",[],"user") then pause, end
+if ~atomsIsInstalled("toolbox_5","allusers") then pause, end
+if ~atomsIsInstalled("toolbox_4","allusers") then pause, end
+if ~atomsIsInstalled("toolbox_2","allusers") then pause, end
+if ~atomsIsInstalled("toolbox_1","allusers") then pause, end
+
+if ~atomsIsInstalled("toolbox_5","user") then pause, end
+if ~atomsIsInstalled("toolbox_4","user") then pause, end
+if ~atomsIsInstalled("toolbox_2","user") then pause, end
+if ~atomsIsInstalled("toolbox_1","user") then pause, end
 
 atomsRemove("toolbox_5","allusers");
-if atomsIsInstalled("toolbox_5",[],"allusers") then pause, end
-if atomsIsInstalled("toolbox_4",[],"allusers") then pause, end
-if atomsIsInstalled("toolbox_2",[],"allusers") then pause, end
-if atomsIsInstalled("toolbox_1",[],"allusers") then pause, end
-if ~atomsIsInstalled("toolbox_5",[],"user") then pause, end
-if ~atomsIsInstalled("toolbox_4",[],"user") then pause, end
-if ~atomsIsInstalled("toolbox_2",[],"user") then pause, end
-if ~atomsIsInstalled("toolbox_1",[],"user") then pause, end
+if atomsIsInstalled("toolbox_5","allusers") then pause, end
+if atomsIsInstalled("toolbox_4","allusers") then pause, end
+if atomsIsInstalled("toolbox_2","allusers") then pause, end
+if atomsIsInstalled("toolbox_1","allusers") then pause, end
+
+if ~atomsIsInstalled("toolbox_5","user") then pause, end
+if ~atomsIsInstalled("toolbox_4","user") then pause, end
+if ~atomsIsInstalled("toolbox_2","user") then pause, end
+if ~atomsIsInstalled("toolbox_1","user") then pause, end
 
 atomsInstall("toolbox_5","allusers");
 atomsRemove("toolbox_5","user");
 
-if atomsIsInstalled("toolbox_5",[],"user") then pause, end
-if atomsIsInstalled("toolbox_4",[],"user") then pause, end
-if atomsIsInstalled("toolbox_2",[],"user") then pause, end
-if atomsIsInstalled("toolbox_1",[],"user") then pause, end
-if ~atomsIsInstalled("toolbox_5",[],"allusers") then pause, end
-if ~atomsIsInstalled("toolbox_4",[],"allusers") then pause, end
-if ~atomsIsInstalled("toolbox_2",[],"allusers") then pause, end
-if ~atomsIsInstalled("toolbox_1",[],"allusers") then pause, end
+if atomsIsInstalled("toolbox_5","user") then pause, end
+if atomsIsInstalled("toolbox_4","user") then pause, end
+if atomsIsInstalled("toolbox_2","user") then pause, end
+if atomsIsInstalled("toolbox_1","user") then pause, end
 
-atomsRemove("toolbox_5","allusers");
+if ~atomsIsInstalled("toolbox_5","allusers") then pause, end
+if ~atomsIsInstalled("toolbox_4","allusers") then pause, end
+if ~atomsIsInstalled("toolbox_2","allusers") then pause, end
+if ~atomsIsInstalled("toolbox_1","allusers") then pause, end
 
+atomsRemove("toolbox_5","allusers");
 
 // Restore original values
 atomsSetConfig("autoload",config_autoload);
diff --git a/scilab/modules/atoms/tests/unit_tests/atomsInstallList.dia.ref b/scilab/modules/atoms/tests/unit_tests/atomsInstallList.dia.ref
new file mode 100644 (file)
index 0000000..ce4fc0d
--- /dev/null
@@ -0,0 +1,50 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Pierre MARECHAL <pierre.marechal@scilab.org>
+//
+//  This file is distributed under the same license as the Scilab package.
+// =============================================================================
+// <-- JVM NOT MANDATORY -->
+load("SCI/modules/atoms/macros/atoms_internals/lib");
+// Load the 1st scenario : See scene1.test.atoms.scilab.org.txt
+// =============================================================================
+atomsRepositorySetOfl("http://scene1.test.atoms.scilab.org");
+atomsGetTOOLBOXES(%T);
+// -----------------------------------------------------------------------------
+ref = [ "+" "U" "toolbox_4" "1.0" ;
+        "+" ""  "toolbox_2" "1.0" ;
+        "+" ""  "toolbox_1" "1.0" ];
+if or(atomsInstallList("toolbox_4")<>ref) then bugmes();quit;end
+// -----------------------------------------------------------------------------
+ref = [ "+" "U" "toolbox_3" "1.0" ;
+        "+" ""  "toolbox_2" "2.0" ;
+        "+" ""  "toolbox_1" "1.0" ];
+if or(atomsInstallList("toolbox_3")<>ref) then bugmes();quit;end
+// -----------------------------------------------------------------------------
+ref = [ "+" "U" "toolbox_6" "1.0" ;
+        "+" ""  "toolbox_2" "2.0" ;
+        "+" ""  "toolbox_1" "1.0" ];
+if or(atomsInstallList("toolbox_6")<>ref) then bugmes();quit;end
+// Load the 2nd scenario : See scene1.test.atoms.scilab.org.txt
+// =============================================================================
+atomsRepositorySetOfl("http://scene2.test.atoms.scilab.org");
+atomsGetTOOLBOXES(%T);
+// -----------------------------------------------------------------------------
+ref = [ "+" "U" "toolbox_4" "1.1" ;
+        "+" ""  "toolbox_2" "1.0" ;
+        "+" ""  "toolbox_1" "1.0" ];
+if or(atomsInstallList("toolbox_4")<>ref) then bugmes();quit;end
+// -----------------------------------------------------------------------------
+ref = [ "+" "U" "toolbox_3" "1.0" ;
+        "+" ""  "toolbox_2" "2.1" ;
+        "+" ""  "toolbox_1" "1.0" ];
+if or(atomsInstallList("toolbox_3")<>ref) then bugmes();quit;end
+// -----------------------------------------------------------------------------
+ref = [ "+" "U" "toolbox_6" "1.0" ;
+        "+" ""  "toolbox_2" "2.1" ;
+        "+" ""  "toolbox_1" "1.0" ];
+if or(atomsInstallList("toolbox_6")<>ref) then bugmes();quit;end
+// Restore Original values
+// =============================================================================
+atomsRepositorySetOfl("http://atoms.scilab.org");
+atomsGetTOOLBOXES(%T);
diff --git a/scilab/modules/atoms/tests/unit_tests/atomsInstallList.tst b/scilab/modules/atoms/tests/unit_tests/atomsInstallList.tst
new file mode 100644 (file)
index 0000000..c65af05
--- /dev/null
@@ -0,0 +1,79 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Pierre MARECHAL <pierre.marechal@scilab.org>
+//
+//  This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- JVM NOT MANDATORY -->
+
+load("SCI/modules/atoms/macros/atoms_internals/lib");
+
+// Load the 1st scenario : See scene1.test.atoms.scilab.org.txt
+// =============================================================================
+
+atomsRepositorySetOfl("http://scene1.test.atoms.scilab.org");
+atomsGetTOOLBOXES(%T);
+
+// -----------------------------------------------------------------------------
+
+ref = [ "+" "U" "toolbox_4" "1.0" ;
+        "+" ""  "toolbox_2" "1.0" ;
+        "+" ""  "toolbox_1" "1.0" ];
+
+if or(atomsInstallList("toolbox_4")<>ref) then pause, end
+
+// -----------------------------------------------------------------------------
+
+ref = [ "+" "U" "toolbox_3" "1.0" ;
+        "+" ""  "toolbox_2" "2.0" ;
+        "+" ""  "toolbox_1" "1.0" ];
+
+if or(atomsInstallList("toolbox_3")<>ref) then pause, end
+
+// -----------------------------------------------------------------------------
+
+ref = [ "+" "U" "toolbox_6" "1.0" ;
+        "+" ""  "toolbox_2" "2.0" ;
+        "+" ""  "toolbox_1" "1.0" ];
+
+if or(atomsInstallList("toolbox_6")<>ref) then pause, end
+
+
+
+// Load the 2nd scenario : See scene1.test.atoms.scilab.org.txt
+// =============================================================================
+
+atomsRepositorySetOfl("http://scene2.test.atoms.scilab.org");
+atomsGetTOOLBOXES(%T);
+
+// -----------------------------------------------------------------------------
+
+ref = [ "+" "U" "toolbox_4" "1.1" ;
+        "+" ""  "toolbox_2" "1.0" ;
+        "+" ""  "toolbox_1" "1.0" ];
+
+if or(atomsInstallList("toolbox_4")<>ref) then pause, end
+
+// -----------------------------------------------------------------------------
+
+ref = [ "+" "U" "toolbox_3" "1.0" ;
+        "+" ""  "toolbox_2" "2.1" ;
+        "+" ""  "toolbox_1" "1.0" ];
+
+if or(atomsInstallList("toolbox_3")<>ref) then pause, end
+
+// -----------------------------------------------------------------------------
+
+ref = [ "+" "U" "toolbox_6" "1.0" ;
+        "+" ""  "toolbox_2" "2.1" ;
+        "+" ""  "toolbox_1" "1.0" ];
+
+if or(atomsInstallList("toolbox_6")<>ref) then pause, end
+
+
+
+// Restore Original values
+// =============================================================================
+atomsRepositorySetOfl("http://atoms.scilab.org");
+atomsGetTOOLBOXES(%T);
index 48a4bf7..e476091 100644 (file)
@@ -6,31 +6,53 @@
 // =============================================================================
 // <-- JVM NOT MANDATORY -->
 load("SCI/modules/atoms/macros/atoms_internals/lib");
-// Load the 2nd scenario : See scene1.test.atoms.scilab.org.txt
-atomsRepositorySetOfl("http://scene2.test.atoms.scilab.org");
 // Do not use the autoload system
 config_autoload = atomsGetConfig("autoload");
+config_Verbose  = atomsGetConfig("Verbose");
 atomsSetConfig("autoload","False");
+atomsSetConfig("Verbose" ,"True");
+// Load the 2nd scenario : See scene2.test.atoms.scilab.org.txt
+// =============================================================================
+atomsRepositorySetOfl("http://scene2.test.atoms.scilab.org");
+atomsGetTOOLBOXES(%T);
 // Install toolbox N°2
-atomsInstall("toolbox_2 2.0");
-atomsInstall("toolbox_2 2.1");
-atomsInstall("toolbox_3 1.0");
+atomsInstall(["toolbox_2","2.0";"toolbox_2","2.1"],"user");
+       toolbox_2 (2.0) will be installed
+       toolbox_1 (1.0) will be installed
+       toolbox_2 (2.1) will be installed
+       Installing toolbox_2 (2.0) ... success
+       Installing toolbox_1 (1.0) ... success
+       Installing toolbox_2 (2.1) ... success
 // Check input parameters
 if execstr("atomsIsInstalled()","errcatch") == 0 then bugmes();quit;end
-if execstr("atomsIsInstalled([""toolbox_1"" ""toolbox_2""],[""1.0"";""2.0""]  )","errcatch") == 0 then bugmes();quit;end
-if execstr("atomsIsInstalled([""toolbox_1"" ""toolbox_1""],[""1.0""]  )","errcatch") == 0 then bugmes();quit;end
+if execstr("atomsIsInstalled([""toolbox_1"",""1.0"";""toolbox_2"",""2.0""],[""1.0"";""2.0""]  )","errcatch") == 0 then bugmes();quit;end
 // Check output results
 if ~ atomsIsInstalled("toolbox_1") then bugmes();quit;end
 if ~ atomsIsInstalled("toolbox_2") then bugmes();quit;end
-if ~ atomsIsInstalled("toolbox_1","1.0") then bugmes();quit;end
-if ~ atomsIsInstalled("toolbox_2","2.0") then bugmes();quit;end
-if ~ atomsIsInstalled("toolbox_2","2.1") then bugmes();quit;end
-if or( atomsIsInstalled(["toolbox_1" "toolbox_2" "toolbox_2" "toolbox_99"],["1.0" "0.0" "2.1" "1.0"] ) <> [%T %F %T %F] )  then bugmes();quit;end
-if or( atomsIsInstalled(["toolbox_1" "toolbox_2";"toolbox_2" "toolbox_99"],["1.0" "0.0";"2.1" "1.0"] ) <> [%T %F;%T %F] )  then bugmes();quit;end
-if or( atomsIsInstalled(["toolbox_1";"toolbox_2";"toolbox_2";"toolbox_99"],["1.0";"0.0";"2.1";"1.0"] ) <> [%T;%F;%T;%F] )  then bugmes();quit;end
-// remove test toolboxes
-atomsRemove("toolbox_2 2.0");
-atomsRemove("toolbox_2 2.1");
+if ~ atomsIsInstalled(["toolbox_1","1.0"]) then bugmes();quit;end
+if ~ atomsIsInstalled(["toolbox_2","2.0"]) then bugmes();quit;end
+if ~ atomsIsInstalled(["toolbox_2","2.1"]) then bugmes();quit;end
+if atomsIsInstalled(["toolbox_1","1.0"],"allusers") then bugmes();quit;end
+if atomsIsInstalled(["toolbox_2","2.0"],"allusers") then bugmes();quit;end
+if atomsIsInstalled(["toolbox_2","2.1"],"allusers") then bugmes();quit;end
+if ~ atomsIsInstalled(["toolbox_1","1.0"],"user") then bugmes();quit;end
+if ~ atomsIsInstalled(["toolbox_2","2.0"],"user") then bugmes();quit;end
+if ~ atomsIsInstalled(["toolbox_2","2.1"],"user") then bugmes();quit;end
+if ~ atomsIsInstalled(["toolbox_1","1.0"],"all") then bugmes();quit;end
+if ~ atomsIsInstalled(["toolbox_2","2.0"],"all") then bugmes();quit;end
+if ~ atomsIsInstalled(["toolbox_2","2.1"],"all") then bugmes();quit;end
+if or( atomsIsInstalled(["toolbox_1","1.0";"toolbox_2","0.0";"toolbox_2","2.1";"toolbox_99","1.0"]) <> [%T;%F;%T;%F] )  then bugmes();quit;end
+// Remove toolbox_5 & toolbox_3
+// =============================================================================
+atomsRemove("toolbox_2","user");
+       toolbox_2 (2.1) will be removed
+       toolbox_2 (2.0) will be removed
+       toolbox_1 (1.0) will be removed
+       Removing toolbox_2 (2.1) ...  success
+       Removing toolbox_2 (2.0) ...  success
+       Removing toolbox_1 (1.0) ...  success
 // Restore original values
+// =============================================================================
 atomsSetConfig("autoload",config_autoload);
+atomsSetConfig("Verbose" ,config_Verbose);
 atomsRepositorySetOfl("http://atoms.scilab.org");
index 29bda5d..3bf2192 100644 (file)
@@ -9,39 +9,52 @@
 
 load("SCI/modules/atoms/macros/atoms_internals/lib");
 
-// Load the 2nd scenario : See scene1.test.atoms.scilab.org.txt
-atomsRepositorySetOfl("http://scene2.test.atoms.scilab.org");
-
 // Do not use the autoload system
 config_autoload = atomsGetConfig("autoload");
+config_Verbose  = atomsGetConfig("Verbose");
 atomsSetConfig("autoload","False");
+atomsSetConfig("Verbose" ,"True");
+
+// Load the 2nd scenario : See scene2.test.atoms.scilab.org.txt
+// =============================================================================
+atomsRepositorySetOfl("http://scene2.test.atoms.scilab.org");
+atomsGetTOOLBOXES(%T);
 
 // Install toolbox N°2
-atomsInstall("toolbox_2 2.0");
-atomsInstall("toolbox_2 2.1");
-atomsInstall("toolbox_3 1.0");
+atomsInstall(["toolbox_2","2.0";"toolbox_2","2.1"],"user");
 
 // Check input parameters
 if execstr("atomsIsInstalled()","errcatch") == 0 then pause; end
-if execstr("atomsIsInstalled([""toolbox_1"" ""toolbox_2""],[""1.0"";""2.0""]  )","errcatch") == 0 then pause, end
-if execstr("atomsIsInstalled([""toolbox_1"" ""toolbox_1""],[""1.0""]  )","errcatch") == 0 then pause, end
+if execstr("atomsIsInstalled([""toolbox_1"",""1.0"";""toolbox_2"",""2.0""],[""1.0"";""2.0""]  )","errcatch") == 0 then pause, end
 
 // Check output results
 if ~ atomsIsInstalled("toolbox_1") then pause, end
 if ~ atomsIsInstalled("toolbox_2") then pause, end
 
-if ~ atomsIsInstalled("toolbox_1","1.0") then pause, end
-if ~ atomsIsInstalled("toolbox_2","2.0") then pause, end
-if ~ atomsIsInstalled("toolbox_2","2.1") then pause, end
+if ~ atomsIsInstalled(["toolbox_1","1.0"]) then pause, end
+if ~ atomsIsInstalled(["toolbox_2","2.0"]) then pause, end
+if ~ atomsIsInstalled(["toolbox_2","2.1"]) then pause, end
 
-if or( atomsIsInstalled(["toolbox_1" "toolbox_2" "toolbox_2" "toolbox_99"],["1.0" "0.0" "2.1" "1.0"] ) <> [%T %F %T %F] )  then pause, end
-if or( atomsIsInstalled(["toolbox_1" "toolbox_2";"toolbox_2" "toolbox_99"],["1.0" "0.0";"2.1" "1.0"] ) <> [%T %F;%T %F] )  then pause, end
-if or( atomsIsInstalled(["toolbox_1";"toolbox_2";"toolbox_2";"toolbox_99"],["1.0";"0.0";"2.1";"1.0"] ) <> [%T;%F;%T;%F] )  then pause, end
+if atomsIsInstalled(["toolbox_1","1.0"],"allusers") then pause, end
+if atomsIsInstalled(["toolbox_2","2.0"],"allusers") then pause, end
+if atomsIsInstalled(["toolbox_2","2.1"],"allusers") then pause, end
 
-// remove test toolboxes
-atomsRemove("toolbox_2 2.0");
-atomsRemove("toolbox_2 2.1");
+if ~ atomsIsInstalled(["toolbox_1","1.0"],"user") then pause, end
+if ~ atomsIsInstalled(["toolbox_2","2.0"],"user") then pause, end
+if ~ atomsIsInstalled(["toolbox_2","2.1"],"user") then pause, end
+
+if ~ atomsIsInstalled(["toolbox_1","1.0"],"all") then pause, end
+if ~ atomsIsInstalled(["toolbox_2","2.0"],"all") then pause, end
+if ~ atomsIsInstalled(["toolbox_2","2.1"],"all") then pause, end
+
+if or( atomsIsInstalled(["toolbox_1","1.0";"toolbox_2","0.0";"toolbox_2","2.1";"toolbox_99","1.0"]) <> [%T;%F;%T;%F] )  then pause, end
+
+// Remove toolbox_5 & toolbox_3
+// =============================================================================
+atomsRemove("toolbox_2","user");
 
 // Restore original values
+// =============================================================================
 atomsSetConfig("autoload",config_autoload);
+atomsSetConfig("Verbose" ,config_Verbose);
 atomsRepositorySetOfl("http://atoms.scilab.org");
diff --git a/scilab/modules/atoms/tests/unit_tests/atomsRemoveList.dia.ref b/scilab/modules/atoms/tests/unit_tests/atomsRemoveList.dia.ref
new file mode 100644 (file)
index 0000000..d7f8851
--- /dev/null
@@ -0,0 +1,91 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Pierre MARECHAL <pierre.marechal@scilab.org>
+//
+//  This file is distributed under the same license as the Scilab package.
+// =============================================================================
+// <-- JVM NOT MANDATORY -->
+load("SCI/modules/atoms/macros/atoms_internals/lib");
+// Do not use the autoload system
+config_autoload = atomsGetConfig("autoload");
+config_Verbose  = atomsGetConfig("Verbose");
+atomsSetConfig("autoload","False");
+atomsSetConfig("Verbose" ,"True");
+// Load the 1st scenario : See scene1.test.atoms.scilab.org.txt
+// =============================================================================
+atomsRepositorySetOfl("http://scene1.test.atoms.scilab.org");
+atomsGetTOOLBOXES(%T);
+// Install toolbox_5 & toolbox_3
+// =============================================================================
+atomsInstall("toolbox_5","user");
+       toolbox_5 (1.0) will be installed
+       toolbox_4 (1.0) will be installed
+       toolbox_2 (1.0) will be installed
+       toolbox_1 (1.0) will be installed
+       Installing toolbox_5 (1.0) ... success
+       Installing toolbox_4 (1.0) ... success
+       Installing toolbox_2 (1.0) ... success
+       Installing toolbox_1 (1.0) ... success
+atomsInstall("toolbox_3","user");
+       toolbox_3 (1.0) will be installed
+       toolbox_2 (2.0) will be installed
+       toolbox_1 (1.0) is already installed and up-to-date
+       Installing toolbox_3 (1.0) ... success
+       Installing toolbox_2 (2.0) ... success
+// -----------------------------------------------------------------------------
+ref = [ "-" "U" "toolbox_1" "1.0" "user" ;
+        "-" "P" "toolbox_5" "1.0" "user" ;
+        "-" "P" "toolbox_4" "1.0" "user" ;
+        "-" "P" "toolbox_2" "1.0" "user" ;
+        "-" "P" "toolbox_3" "1.0" "user" ;
+        "-" "P" "toolbox_2" "2.0" "user" ];
+if or(atomsRemoveList(["toolbox_1"]      ,"user")<>ref) then bugmes();quit;end
+if or(atomsRemoveList(["toolbox_1" "1.0"],"user")<>ref) then bugmes();quit;end
+// -----------------------------------------------------------------------------
+ref = [ "-" "U" "toolbox_2" "1.0" "user" ;
+        "-" "P" "toolbox_5" "1.0" "user" ;
+        "-" "P" "toolbox_4" "1.0" "user" ;
+        "~" "C" "toolbox_1" "1.0" "user" ];
+if or(atomsRemoveList(["toolbox_2" "1.0"],"user")<>ref) then bugmes();quit;end
+// -----------------------------------------------------------------------------
+ref = [ "-" "U" "toolbox_2" "2.0" "user" ;
+        "-" "P" "toolbox_3" "1.0" "user" ;
+        "~" "C" "toolbox_1" "1.0" "user" ];
+if or(atomsRemoveList(["toolbox_2" "2.0"],"user")<>ref) then bugmes();quit;end
+// -----------------------------------------------------------------------------
+ref = [ "-" "U" "toolbox_2" "2.0" "user" ;
+        "-" "U" "toolbox_2" "1.0" "user" ;
+        "-" "P" "toolbox_3" "1.0" "user" ;
+        "-" "C" "toolbox_1" "1.0" "user" ;
+        "-" "P" "toolbox_5" "1.0" "user" ;
+        "-" "P" "toolbox_4" "1.0" "user" ];
+if or(atomsRemoveList(["toolbox_2"],"user")<>ref) then bugmes();quit;end
+// -----------------------------------------------------------------------------
+ref = [ "-" "U" "toolbox_2" "2.0" "user" ;
+        "-" "U" "toolbox_2" "1.0" "user" ;
+        "-" "U" "toolbox_4" "1.0" "user" ;
+        "-" "P" "toolbox_3" "1.0" "user" ;
+        "-" "C" "toolbox_1" "1.0" "user" ;
+        "-" "P" "toolbox_5" "1.0" "user" ];
+if or(atomsRemoveList(["toolbox_2";"toolbox_4"],"user")<>ref) then bugmes();quit;end
+// Remove toolbox_5 & toolbox_3
+// =============================================================================
+atomsRemove("toolbox_5","user");
+       toolbox_5 (1.0) will be removed
+       toolbox_4 (1.0) will be removed
+       toolbox_2 (1.0) will be removed
+       Removing toolbox_5 (1.0) ...  success
+       Removing toolbox_4 (1.0) ...  success
+       Removing toolbox_2 (1.0) ...  success
+atomsRemove("toolbox_3","user");
+       toolbox_3 (1.0) will be removed
+       toolbox_2 (2.0) will be removed
+       toolbox_1 (1.0) will be removed
+       Removing toolbox_3 (1.0) ...  success
+       Removing toolbox_2 (2.0) ...  success
+       Removing toolbox_1 (1.0) ...  success
+// Restore original values
+// =============================================================================
+atomsSetConfig("autoload",config_autoload);
+atomsSetConfig("Verbose" ,config_Verbose);
+atomsRepositorySetOfl("http://atoms.scilab.org");
diff --git a/scilab/modules/atoms/tests/unit_tests/atomsRemoveList.tst b/scilab/modules/atoms/tests/unit_tests/atomsRemoveList.tst
new file mode 100644 (file)
index 0000000..cb91f14
--- /dev/null
@@ -0,0 +1,89 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Pierre MARECHAL <pierre.marechal@scilab.org>
+//
+//  This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- JVM NOT MANDATORY -->
+
+load("SCI/modules/atoms/macros/atoms_internals/lib");
+
+// Do not use the autoload system
+config_autoload = atomsGetConfig("autoload");
+config_Verbose  = atomsGetConfig("Verbose");
+atomsSetConfig("autoload","False");
+atomsSetConfig("Verbose" ,"True");
+
+// Load the 1st scenario : See scene1.test.atoms.scilab.org.txt
+// =============================================================================
+atomsRepositorySetOfl("http://scene1.test.atoms.scilab.org");
+atomsGetTOOLBOXES(%T);
+
+// Install toolbox_5 & toolbox_3
+// =============================================================================
+atomsInstall("toolbox_5","user");
+atomsInstall("toolbox_3","user");
+
+// -----------------------------------------------------------------------------
+
+ref = [ "-" "U" "toolbox_1" "1.0" "user" ;
+        "-" "P" "toolbox_5" "1.0" "user" ;
+        "-" "P" "toolbox_4" "1.0" "user" ;
+        "-" "P" "toolbox_2" "1.0" "user" ;
+        "-" "P" "toolbox_3" "1.0" "user" ;
+        "-" "P" "toolbox_2" "2.0" "user" ];
+
+if or(atomsRemoveList(["toolbox_1"]      ,"user")<>ref) then pause, end
+if or(atomsRemoveList(["toolbox_1" "1.0"],"user")<>ref) then pause, end
+
+// -----------------------------------------------------------------------------
+
+ref = [ "-" "U" "toolbox_2" "1.0" "user" ;
+        "-" "P" "toolbox_5" "1.0" "user" ;
+        "-" "P" "toolbox_4" "1.0" "user" ;
+        "~" "C" "toolbox_1" "1.0" "user" ];
+
+if or(atomsRemoveList(["toolbox_2" "1.0"],"user")<>ref) then pause, end
+
+// -----------------------------------------------------------------------------
+
+ref = [ "-" "U" "toolbox_2" "2.0" "user" ;
+        "-" "P" "toolbox_3" "1.0" "user" ;
+        "~" "C" "toolbox_1" "1.0" "user" ];
+
+if or(atomsRemoveList(["toolbox_2" "2.0"],"user")<>ref) then pause, end
+
+// -----------------------------------------------------------------------------
+
+ref = [ "-" "U" "toolbox_2" "2.0" "user" ;
+        "-" "U" "toolbox_2" "1.0" "user" ;
+        "-" "P" "toolbox_3" "1.0" "user" ;
+        "-" "C" "toolbox_1" "1.0" "user" ;
+        "-" "P" "toolbox_5" "1.0" "user" ;
+        "-" "P" "toolbox_4" "1.0" "user" ];
+
+if or(atomsRemoveList(["toolbox_2"],"user")<>ref) then pause, end
+
+// -----------------------------------------------------------------------------
+
+ref = [ "-" "U" "toolbox_2" "2.0" "user" ;
+        "-" "U" "toolbox_2" "1.0" "user" ;
+        "-" "U" "toolbox_4" "1.0" "user" ;
+        "-" "P" "toolbox_3" "1.0" "user" ;
+        "-" "C" "toolbox_1" "1.0" "user" ;
+        "-" "P" "toolbox_5" "1.0" "user" ];
+
+if or(atomsRemoveList(["toolbox_2";"toolbox_4"],"user")<>ref) then pause, end
+
+
+// Remove toolbox_5 & toolbox_3
+// =============================================================================
+atomsRemove("toolbox_5","user");
+atomsRemove("toolbox_3","user");
+
+// Restore original values
+// =============================================================================
+atomsSetConfig("autoload",config_autoload);
+atomsSetConfig("Verbose" ,config_Verbose);
+atomsRepositorySetOfl("http://atoms.scilab.org");
diff --git a/scilab/modules/atoms/tests/unit_tests/atomsRepositoryDel.dia.ref b/scilab/modules/atoms/tests/unit_tests/atomsRepositoryDel.dia.ref
new file mode 100644 (file)
index 0000000..273b01e
--- /dev/null
@@ -0,0 +1,30 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Pierre MARECHAL <pierre.marechal@scilab.org>
+//
+//  This file is distributed under the same license as the Scilab package.
+// =============================================================================
+// <-- JVM NOT MANDATORY -->
+if isempty([ atomsRepositoryList("user") ; atomsRepositoryList("allusers")]) then
+       
+       rep1 = "http://scene1.test.atoms.scilab.org";
+       rep2 = "http://scene2.test.atoms.scilab.org";
+       
+       if atomsRepositoryAdd(rep1,"user")     <> 1 then bugmes();quit;end
+       if atomsRepositoryAdd(rep2,"allusers") <> 1 then bugmes();quit;end
+       
+       if or(atomsRepositoryList("user")     <> [rep1,"user"]) then bugmes();quit;end
+       if or(atomsRepositoryList("allusers") <> [rep2,"allusers"]) then bugmes();quit;end
+       
+       if find( atomsRepositoryList("all") == [rep1]) == [] then bugmes();quit;end
+       if find( atomsRepositoryList("all") == [rep2]) == [] then bugmes();quit;end
+       
+       if atomsRepositoryDel(rep1,"user") <> 1 then bugmes();quit;end
+       if atomsRepositoryDel(rep2,"allusers") <> 1 then bugmes();quit;end
+       
+       if atomsRepositoryAdd( [rep1;rep2],"user") <> 2 then bugmes();quit;end
+       if or(atomsRepositoryList("user")     <> [rep1 "user";rep2 "user"]) then bugmes();quit;end
+       if or(atomsRepositoryList("allusers") <> []) then bugmes();quit;end
+       if atomsRepositoryDel([rep1;rep2],"user") <> 2 then bugmes();quit;end
+       
+end
diff --git a/scilab/modules/atoms/tests/unit_tests/atomsRepositoryDel.tst b/scilab/modules/atoms/tests/unit_tests/atomsRepositoryDel.tst
new file mode 100644 (file)
index 0000000..e372f69
--- /dev/null
@@ -0,0 +1,32 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Pierre MARECHAL <pierre.marechal@scilab.org>
+//
+//  This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- JVM NOT MANDATORY -->
+
+if isempty([ atomsRepositoryList("user") ; atomsRepositoryList("allusers")]) then
+       
+       rep1 = "http://scene1.test.atoms.scilab.org";
+       rep2 = "http://scene2.test.atoms.scilab.org";
+       
+       if atomsRepositoryAdd(rep1,"user")     <> 1 then pause, end
+       if atomsRepositoryAdd(rep2,"allusers") <> 1 then pause, end
+       
+       if or(atomsRepositoryList("user")     <> [rep1,"user"]) then pause, end
+       if or(atomsRepositoryList("allusers") <> [rep2,"allusers"]) then pause, end
+       
+       if find( atomsRepositoryList("all") == [rep1]) == [] then pause, end
+       if find( atomsRepositoryList("all") == [rep2]) == [] then pause, end
+       
+       if atomsRepositoryDel(rep1,"user") <> 1 then pause, end
+       if atomsRepositoryDel(rep2,"allusers") <> 1 then pause, end
+       
+       if atomsRepositoryAdd( [rep1;rep2],"user") <> 2 then pause, end
+       if or(atomsRepositoryList("user")     <> [rep1 "user";rep2 "user"]) then pause, end
+       if or(atomsRepositoryList("allusers") <> []) then pause, end
+       if atomsRepositoryDel([rep1;rep2],"user") <> 2 then pause, end
+       
+end
diff --git a/scilab/modules/atoms/tests/unit_tests/atomsUpdate.dia.ref b/scilab/modules/atoms/tests/unit_tests/atomsUpdate.dia.ref
new file mode 100644 (file)
index 0000000..8be1f94
--- /dev/null
@@ -0,0 +1,33 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Pierre MARECHAL <pierre.marechal@scilab.org>
+//
+//  This file is distributed under the same license as the Scilab package.
+// =============================================================================
+// <-- JVM NOT MANDATORY -->
+load("SCI/modules/atoms/macros/atoms_internals/lib");
+// Load the 1st scenario : See scene1.test.atoms.scilab.org.txt
+atomsRepositorySetOfl("http://scene1.test.atoms.scilab.org");
+atomsGetTOOLBOXES(%T);
+// Do not use the autoload system
+config_autoload = atomsGetConfig("autoload");
+atomsSetConfig("autoload","False");
+// Install the toolbox 5
+// =============================================================================
+atomsInstall("toolbox_5");
+// Check if the module is really installed
+if ~atomsIsInstalled(["toolbox_5" "1.0"]) then bugmes();quit;end
+if ~atomsIsInstalled(["toolbox_4" "1.0"]) then bugmes();quit;end
+if ~atomsIsInstalled(["toolbox_2" "1.0"]) then bugmes();quit;end
+if ~atomsIsInstalled(["toolbox_1" "1.0"]) then bugmes();quit;end
+// Load the 1st scenario : See scene1.test.atoms.scilab.org.txt
+atomsRepositorySetOfl("http://scene2.test.atoms.scilab.org");
+atomsGetTOOLBOXES(%T);
+atomsUpdate();
+if ~atomsIsInstalled(["toolbox_5" "1.0"]) then bugmes();quit;end
+if  atomsIsInstalled(["toolbox_4" "1.0"]) then bugmes();quit;end
+if ~atomsIsInstalled(["toolbox_4" "1.1"]) then bugmes();quit;end
+if ~atomsIsInstalled(["toolbox_2" "1.0"]) then bugmes();quit;end
+if ~atomsIsInstalled(["toolbox_1" "1.0"]) then bugmes();quit;end
+// Remove the module
+atomsRemove("toolbox_5");
diff --git a/scilab/modules/atoms/tests/unit_tests/atomsUpdate.tst b/scilab/modules/atoms/tests/unit_tests/atomsUpdate.tst
new file mode 100644 (file)
index 0000000..303c13c
--- /dev/null
@@ -0,0 +1,47 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Pierre MARECHAL <pierre.marechal@scilab.org>
+//
+//  This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- JVM NOT MANDATORY -->
+
+load("SCI/modules/atoms/macros/atoms_internals/lib");
+
+// Load the 1st scenario : See scene1.test.atoms.scilab.org.txt
+atomsRepositorySetOfl("http://scene1.test.atoms.scilab.org");
+atomsGetTOOLBOXES(%T);
+
+// Do not use the autoload system
+config_autoload = atomsGetConfig("autoload");
+atomsSetConfig("autoload","False");
+
+
+// Install the toolbox 5
+// =============================================================================
+
+atomsInstall("toolbox_5");
+
+// Check if the module is really installed
+if ~atomsIsInstalled(["toolbox_5" "1.0"]) then pause, end
+if ~atomsIsInstalled(["toolbox_4" "1.0"]) then pause, end
+if ~atomsIsInstalled(["toolbox_2" "1.0"]) then pause, end
+if ~atomsIsInstalled(["toolbox_1" "1.0"]) then pause, end
+
+// Load the 1st scenario : See scene1.test.atoms.scilab.org.txt
+atomsRepositorySetOfl("http://scene2.test.atoms.scilab.org");
+atomsGetTOOLBOXES(%T);
+
+atomsUpdate();
+
+if ~atomsIsInstalled(["toolbox_5" "1.0"]) then pause, end
+
+if  atomsIsInstalled(["toolbox_4" "1.0"]) then pause, end
+if ~atomsIsInstalled(["toolbox_4" "1.1"]) then pause, end
+
+if ~atomsIsInstalled(["toolbox_2" "1.0"]) then pause, end
+if ~atomsIsInstalled(["toolbox_1" "1.0"]) then pause, end
+
+// Remove the module
+atomsRemove("toolbox_5");