remove .class file and update tests. 63/5863/4
Allan CORNET [Tue, 10 Jan 2012 15:22:39 +0000 (16:22 +0100)]
Change-Id: If2360231a6b6e2b74ebc9a2255210988c41e7ea1

43 files changed:
scilab/modules/core/tests/unit_tests/getmd5.encoding.dia.ref
scilab/modules/core/tests/unit_tests/getmd5.encoding.tst
scilab/modules/dynamic_link/tests/unit_tests/link.encoding.dia.ref
scilab/modules/dynamic_link/tests/unit_tests/link.encoding.tst
scilab/modules/fileio/tests/unit_tests/cd.encoding.dia.ref
scilab/modules/fileio/tests/unit_tests/cd.encoding.tst
scilab/modules/fileio/tests/unit_tests/chdir.encoding.dia.ref
scilab/modules/fileio/tests/unit_tests/chdir.encoding.tst
scilab/modules/fileio/tests/unit_tests/deletefile.encoding.dia.ref
scilab/modules/fileio/tests/unit_tests/deletefile.encoding.tst
scilab/modules/fileio/tests/unit_tests/fileext.encoding.dia.ref
scilab/modules/fileio/tests/unit_tests/fileext.encoding.tst
scilab/modules/fileio/tests/unit_tests/fileinfo.encoding.dia.ref
scilab/modules/fileio/tests/unit_tests/fileinfo.encoding.tst
scilab/modules/fileio/tests/unit_tests/fprintfMat.encoding.dia.ref
scilab/modules/fileio/tests/unit_tests/fprintfMat.encoding.tst
scilab/modules/fileio/tests/unit_tests/fullpath.encoding.dia.ref
scilab/modules/fileio/tests/unit_tests/fullpath.encoding.tst
scilab/modules/fileio/tests/unit_tests/getshortlongpathname.encoding.dia.ref
scilab/modules/fileio/tests/unit_tests/getshortlongpathname.encoding.tst
scilab/modules/fileio/tests/unit_tests/isfile.dia.ref
scilab/modules/fileio/tests/unit_tests/isfile.tst
scilab/modules/fileio/tests/unit_tests/mopen.encoding.dia.ref
scilab/modules/fileio/tests/unit_tests/mopen.encoding.tst
scilab/modules/fileio/tests/unit_tests/newest.encoding.dia.ref
scilab/modules/fileio/tests/unit_tests/newest.encoding.tst
scilab/modules/fileio/tests/unit_tests/pwd.encoding.dia.ref
scilab/modules/fileio/tests/unit_tests/pwd.encoding.tst
scilab/modules/fileio/tests/unit_tests/removedir.encoding.dia.ref
scilab/modules/fileio/tests/unit_tests/removedir.encoding.tst
scilab/modules/functions/tests/unit_tests/libraryinfo.encoding.dia.ref
scilab/modules/functions/tests/unit_tests/libraryinfo.encoding.tst
scilab/modules/graphics/tests/unit_tests/xlfont.dia.ref
scilab/modules/graphics/tests/unit_tests/xlfont.tst
scilab/modules/history_manager/tests/unit_tests/historyfile.encoding.dia.ref
scilab/modules/history_manager/tests/unit_tests/historyfile.encoding.tst
scilab/modules/io/tests/unit_tests/searchenv.encoding.dia.ref
scilab/modules/io/tests/unit_tests/searchenv.encoding.tst
scilab/modules/localization/tests/unit_tests/CreateDir.class [deleted file]
scilab/modules/localization/tests/unit_tests/CreateDir.java [deleted file]
scilab/modules/localization/tests/unit_tests/CreateDir.sce [new file with mode: 0644]
scilab/modules/localization/tests/unit_tests/io_encoding.dia.ref
scilab/modules/localization/tests/unit_tests/io_encoding.tst

index 4b14004..8a282d1 100644 (file)
@@ -5,11 +5,7 @@
 //  This file is distributed under the same license as the Scilab package.
 // =============================================================================
 cd(TMPDIR);
-if getos() == 'Windows' then
-       unix_w(jre_path()+"\bin\java.exe -cp "+SCI+"\modules\localization\tests\unit_tests CreateDir");
-else
-       unix_w(jre_path()+"/bin/java -classpath "+SCI+"/modules/localization/tests/unit_tests CreateDir");
-end
+exec(SCI+"/modules/localization/tests/unit_tests/CreateDir.sce", -1);
 tab_ref = [
 "世界您好",
 "азеазея",
index 9c4db8d..f48eaa4 100644 (file)
@@ -7,11 +7,7 @@
 
 cd(TMPDIR);
 
-if getos() == 'Windows' then
-       unix_w(jre_path()+"\bin\java.exe -cp "+SCI+"\modules\localization\tests\unit_tests CreateDir");
-else
-       unix_w(jre_path()+"/bin/java -classpath "+SCI+"/modules/localization/tests/unit_tests CreateDir");
-end
+exec(SCI+"/modules/localization/tests/unit_tests/CreateDir.sce", -1);
 
 tab_ref = [
 "世界您好",
index 86ab86d..91dd139 100644 (file)
@@ -6,11 +6,7 @@
 // =============================================================================
 ilib_verbose(0);
 cd(TMPDIR);
-if getos() == 'Windows' then
-       unix_w(jre_path()+"\bin\java.exe -cp "+SCI+"\modules\localization\tests\unit_tests CreateDir");
-else
-       unix_w(jre_path()+"/bin/java -classpath "+SCI+"/modules/localization/tests/unit_tests CreateDir");
-end
+exec(SCI+"/modules/localization/tests/unit_tests/CreateDir.sce", -1);
 tab_ref = [
 "世界您好",
 "азеазея",
index 6190efe..20fdf06 100644 (file)
@@ -9,11 +9,7 @@
 ilib_verbose(0);
 cd(TMPDIR);
 
-if getos() == 'Windows' then
-       unix_w(jre_path()+"\bin\java.exe -cp "+SCI+"\modules\localization\tests\unit_tests CreateDir");
-else
-       unix_w(jre_path()+"/bin/java -classpath "+SCI+"/modules/localization/tests/unit_tests CreateDir");
-end
+exec(SCI+"/modules/localization/tests/unit_tests/CreateDir.sce", -1);
 
 tab_ref = [
 "世界您好",
index 6686e05..e9f3d5d 100644 (file)
@@ -6,11 +6,7 @@
 // =============================================================================
 // <-- JVM MANDATORY -->
 tmp = cd(TMPDIR);
-if getos() == 'Windows' then
-       unix_w(jre_path()+"\bin\java.exe -cp "+SCI+"\modules\localization\tests\unit_tests CreateDir");
-else
-       unix_w(jre_path()+"/bin/java -classpath "+SCI+"/modules/localization/tests/unit_tests CreateDir");
-end
+exec(SCI+"/modules/localization/tests/unit_tests/CreateDir.sce", -1);
 tab_ref = [
 "世界您好",
 "азеазея",
index b493468..18af218 100644 (file)
@@ -8,12 +8,7 @@
 // <-- JVM MANDATORY -->
 
 tmp = cd(TMPDIR);
-
-if getos() == 'Windows' then
-       unix_w(jre_path()+"\bin\java.exe -cp "+SCI+"\modules\localization\tests\unit_tests CreateDir");
-else
-       unix_w(jre_path()+"/bin/java -classpath "+SCI+"/modules/localization/tests/unit_tests CreateDir");
-end
+exec(SCI+"/modules/localization/tests/unit_tests/CreateDir.sce", -1);
 
 tab_ref = [
 "世界您好",
index 271d74d..c458952 100644 (file)
@@ -7,10 +7,6 @@
 // <-- JVM MANDATORY -->
 a = chdir(TMPDIR);
 if(a <> %T) then bugmes();quit;end
-if getos() == 'Windows' then
-       unix_w(jre_path()+"\bin\java.exe -cp "+SCI+"\modules\localization\tests\unit_tests CreateDir");
-else
-       unix_w(jre_path()+"/bin/java -classpath "+SCI+"/modules/localization/tests/unit_tests CreateDir");
-end
+exec(SCI+"/modules/localization/tests/unit_tests/CreateDir.sce", -1);
 b = chdir("dir_азеазея");
 if(b <> %T) then bugmes();quit;end
index bb8fd24..a6df721 100644 (file)
 a = chdir(TMPDIR);
 if(a <> %T) then pause, end
 
-if getos() == 'Windows' then
-       unix_w(jre_path()+"\bin\java.exe -cp "+SCI+"\modules\localization\tests\unit_tests CreateDir");
-else
-       unix_w(jre_path()+"/bin/java -classpath "+SCI+"/modules/localization/tests/unit_tests CreateDir");
-end
+exec(SCI+"/modules/localization/tests/unit_tests/CreateDir.sce", -1);
 
 b = chdir("dir_азеазея");
 if(b <> %T) then pause, end
index 7699174..8b746d1 100644 (file)
@@ -6,11 +6,7 @@
 // =============================================================================
 // <-- JVM MANDATORY -->
 cd(TMPDIR);
-if getos() == 'Windows' then
-       unix_w(jre_path()+"\bin\java.exe -cp "+SCI+"\modules\localization\tests\unit_tests CreateDir");
-else
-       unix_w(jre_path()+"/bin/java -classpath "+SCI+"/modules/localization/tests/unit_tests CreateDir");
-end
+exec(SCI+"/modules/localization/tests/unit_tests/CreateDir.sce", -1);
 tab_ref = [
 "世界您好",
 "азеазея",
index e40baa9..3fbe537 100644 (file)
@@ -9,11 +9,7 @@
 
 cd(TMPDIR);
 
-if getos() == 'Windows' then
-       unix_w(jre_path()+"\bin\java.exe -cp "+SCI+"\modules\localization\tests\unit_tests CreateDir");
-else
-       unix_w(jre_path()+"/bin/java -classpath "+SCI+"/modules/localization/tests/unit_tests CreateDir");
-end
+exec(SCI+"/modules/localization/tests/unit_tests/CreateDir.sce", -1);
 
 tab_ref = [
 "世界您好",
index 620d8cd..e4ef8d6 100644 (file)
@@ -6,11 +6,7 @@
 // =============================================================================
 // <-- JVM MANDATORY -->
 cd(TMPDIR);
-if getos() == 'Windows' then
-       unix_w(jre_path()+"\bin\java.exe -cp "+SCI+"\modules\localization\tests\unit_tests CreateDir");
-else
-       unix_w(jre_path()+"/bin/java -classpath "+SCI+"/modules/localization/tests/unit_tests CreateDir");
-end
+exec(SCI+"/modules/localization/tests/unit_tests/CreateDir.sce", -1);
 tab_ref = [
 "世界您好",
 "азеазея",
index 45ce975..b47adbe 100644 (file)
@@ -9,11 +9,7 @@
 
 cd(TMPDIR);
 
-if getos() == 'Windows' then
-       unix_w(jre_path()+"\bin\java.exe -cp "+SCI+"\modules\localization\tests\unit_tests CreateDir");
-else
-       unix_w(jre_path()+"/bin/java -classpath "+SCI+"/modules/localization/tests/unit_tests CreateDir");
-end
+exec(SCI+"/modules/localization/tests/unit_tests/CreateDir.sce", -1);
 
 tab_ref = [
 "世界您好",
index 94b0bd5..070999d 100644 (file)
@@ -6,11 +6,7 @@
 // =============================================================================
 // <-- JVM MANDATORY -->
 cd(TMPDIR);
-if getos() == 'Windows' then
-       unix_w(jre_path()+"\bin\java.exe -cp "+SCI+"\modules\localization\tests\unit_tests CreateDir");
-else
-       unix_w(jre_path()+"/bin/java -classpath "+SCI+"/modules/localization/tests/unit_tests CreateDir");
-end
+exec(SCI+"/modules/localization/tests/unit_tests/CreateDir.sce", -1);
 tab_ref = [
 "世界您好",
 "азеазея",
index a8f69b8..55dcd98 100644 (file)
@@ -9,11 +9,8 @@
 
 cd(TMPDIR);
 
-if getos() == 'Windows' then
-       unix_w(jre_path()+"\bin\java.exe -cp "+SCI+"\modules\localization\tests\unit_tests CreateDir");
-else
-       unix_w(jre_path()+"/bin/java -classpath "+SCI+"/modules/localization/tests/unit_tests CreateDir");
-end
+exec(SCI+"/modules/localization/tests/unit_tests/CreateDir.sce", -1);
+
 
 tab_ref = [
 "世界您好",
index 1a15e19..366a4cf 100644 (file)
@@ -6,11 +6,7 @@
 // =============================================================================
 // <-- JVM MANDATORY -->
 cd(TMPDIR);
-if getos() == 'Windows' then
-       unix_w(jre_path()+"\bin\java.exe -cp "+SCI+"\modules\localization\tests\unit_tests CreateDir");
-else
-       unix_w(jre_path()+"/bin/java -classpath "+SCI+"/modules/localization/tests/unit_tests CreateDir");
-end
+exec(SCI+"/modules/localization/tests/unit_tests/CreateDir.sce", -1);
 tab_ref = [
 "世界您好",
 "азеазея",
index 886e379..d535878 100644 (file)
@@ -9,11 +9,8 @@
 
 cd(TMPDIR);
 
-if getos() == 'Windows' then
-       unix_w(jre_path()+"\bin\java.exe -cp "+SCI+"\modules\localization\tests\unit_tests CreateDir");
-else
-       unix_w(jre_path()+"/bin/java -classpath "+SCI+"/modules/localization/tests/unit_tests CreateDir");
-end
+exec(SCI+"/modules/localization/tests/unit_tests/CreateDir.sce", -1);
+
 
 tab_ref = [
 "世界您好",
index 63208f6..37484ae 100644 (file)
@@ -6,11 +6,7 @@
 // =============================================================================
 // <-- JVM MANDATORY -->
 cd(TMPDIR);
-if getos() == 'Windows' then
-       unix_w(jre_path()+"\bin\java.exe -cp "+SCI+"\modules\localization\tests\unit_tests CreateDir");
-else
-       unix_w(jre_path()+"/bin/java -classpath "+SCI+"/modules/localization/tests/unit_tests CreateDir");
-end
+exec(SCI+"/modules/localization/tests/unit_tests/CreateDir.sce", -1);
 tab_ref = [
 "世界您好",
 "азеазея",
index 6472f3a..0ba15b4 100644 (file)
@@ -9,11 +9,8 @@
 
 cd(TMPDIR);
 
-if getos() == 'Windows' then
-       unix_w(jre_path()+"\bin\java.exe -cp "+SCI+"\modules\localization\tests\unit_tests CreateDir");
-else
-       unix_w(jre_path()+"/bin/java -classpath "+SCI+"/modules/localization/tests/unit_tests CreateDir");
-end
+exec(SCI+"/modules/localization/tests/unit_tests/CreateDir.sce", -1);
+
 
 tab_ref = [
 "世界您好",
index addb467..2ddf602 100644 (file)
@@ -6,11 +6,7 @@
 // =============================================================================
 // <-- JVM MANDATORY -->
 cd(TMPDIR);
-if getos() == 'Windows' then
-       unix_w(jre_path()+"\bin\java.exe -cp "+SCI+"\modules\localization\tests\unit_tests CreateDir");
-else
-       unix_w(jre_path()+"/bin/java -classpath "+SCI+"/modules/localization/tests/unit_tests CreateDir");
-end
+exec(SCI+"/modules/localization/tests/unit_tests/CreateDir.sce", -1);
 tab_ref = [
 "世界您好",
 "азеазея",
index 96b129e..2a6802b 100644 (file)
@@ -9,11 +9,7 @@
 
 cd(TMPDIR);
 
-if getos() == 'Windows' then
-       unix_w(jre_path()+"\bin\java.exe -cp "+SCI+"\modules\localization\tests\unit_tests CreateDir");
-else
-       unix_w(jre_path()+"/bin/java -classpath "+SCI+"/modules/localization/tests/unit_tests CreateDir");
-end
+exec(SCI+"/modules/localization/tests/unit_tests/CreateDir.sce", -1);
 
 tab_ref = [
 "世界您好",
index 7a7c552..4524948 100644 (file)
@@ -6,11 +6,7 @@
 // =============================================================================
 // <-- JVM MANDATORY -->
 cd(TMPDIR);
-if getos() == 'Windows' then
-       unix_w(jre_path()+"\bin\java.exe -cp "+SCI+"\modules\localization\tests\unit_tests CreateDir");
-else
-       unix_w(jre_path()+"/bin/java -classpath "+SCI+"/modules/localization/tests/unit_tests CreateDir");
-end
+exec(SCI+"/modules/localization/tests/unit_tests/CreateDir.sce", -1);
 tab_ref = [
 "世界您好",
 "азеазея",
index b529c10..80d39c0 100644 (file)
@@ -9,11 +9,8 @@
 
 cd(TMPDIR);
 
-if getos() == 'Windows' then
-       unix_w(jre_path()+"\bin\java.exe -cp "+SCI+"\modules\localization\tests\unit_tests CreateDir");
-else
-       unix_w(jre_path()+"/bin/java -classpath "+SCI+"/modules/localization/tests/unit_tests CreateDir");
-end
+exec(SCI+"/modules/localization/tests/unit_tests/CreateDir.sce", -1);
+
 
 tab_ref = [
 "世界您好",
index bb0cab7..fe739cd 100644 (file)
@@ -6,11 +6,7 @@
 // =============================================================================
 // <-- JVM MANDATORY -->
 cd(TMPDIR);
-if getos() == 'Windows' then
-       unix_w(jre_path()+"\bin\java.exe -cp "+SCI+"\modules\localization\tests\unit_tests CreateDir");
-else
-       unix_w(jre_path()+"/bin/java -classpath "+SCI+"/modules/localization/tests/unit_tests CreateDir");
-end
+exec(SCI+"/modules/localization/tests/unit_tests/CreateDir.sce", -1);
 tab_ref = [
 "世界您好",
 "азеазея",
index c0c93f3..c6f8224 100644 (file)
@@ -8,11 +8,8 @@
 // <-- JVM MANDATORY -->
 
 cd(TMPDIR);
-if getos() == 'Windows' then
-       unix_w(jre_path()+"\bin\java.exe -cp "+SCI+"\modules\localization\tests\unit_tests CreateDir");
-else
-       unix_w(jre_path()+"/bin/java -classpath "+SCI+"/modules/localization/tests/unit_tests CreateDir");
-end
+exec(SCI+"/modules/localization/tests/unit_tests/CreateDir.sce", -1);
+
 tab_ref = [
 "世界您好",
 "азеазея",
index f84ef65..aa0a480 100644 (file)
@@ -6,11 +6,7 @@
 // =============================================================================
 // <-- JVM MANDATORY -->
 chdir(TMPDIR);
-if getos() == 'Windows' then
-       unix_w(jre_path()+"\bin\java.exe -cp "+SCI+"\modules\localization\tests\unit_tests CreateDir");
-else
-       unix_w(jre_path()+"/bin/java -classpath "+SCI+"/modules/localization/tests/unit_tests CreateDir");
-end
+exec(SCI+"/modules/localization/tests/unit_tests/CreateDir.sce", -1);
 tab_ref = [
 "世界您好",
 "азеазея",
index 48e2f34..ea513a6 100644 (file)
@@ -9,11 +9,8 @@
 
 chdir(TMPDIR);
 
-if getos() == 'Windows' then
-       unix_w(jre_path()+"\bin\java.exe -cp "+SCI+"\modules\localization\tests\unit_tests CreateDir");
-else
-       unix_w(jre_path()+"/bin/java -classpath "+SCI+"/modules/localization/tests/unit_tests CreateDir");
-end
+exec(SCI+"/modules/localization/tests/unit_tests/CreateDir.sce", -1);
+
 
 tab_ref = [
 "世界您好",
index 846d8fe..dbc9a1e 100644 (file)
@@ -6,11 +6,7 @@
 // =============================================================================
 // <-- JVM MANDATORY -->
 chdir(TMPDIR);
-if getos() == 'Windows' then
-       unix_w(jre_path()+"\bin\java.exe -cp "+SCI+"\modules\localization\tests\unit_tests CreateDir");
-else
-       unix_w(jre_path()+"/bin/java -classpath "+SCI+"/modules/localization/tests/unit_tests CreateDir");
-end
+exec(SCI+"/modules/localization/tests/unit_tests/CreateDir.sce", -1);
 tab_ref = [
 "世界您好",
 "азеазея",
index 1ec43dc..c66efe2 100644 (file)
@@ -9,11 +9,8 @@
 
 chdir(TMPDIR);
 
-if getos() == 'Windows' then
-       unix_w(jre_path()+"\bin\java.exe -cp "+SCI+"\modules\localization\tests\unit_tests CreateDir");
-else
-       unix_w(jre_path()+"/bin/java -classpath "+SCI+"/modules/localization/tests/unit_tests CreateDir");
-end
+exec(SCI+"/modules/localization/tests/unit_tests/CreateDir.sce", -1);
+
 
 tab_ref = [
 "世界您好",
index 86aec4b..a94e44f 100644 (file)
@@ -13,11 +13,7 @@ warning("off");
 a = createdir("test_removedir");
 if(a <> %T) then bugmes();quit;end
 cd("test_removedir");
-if getos() == 'Windows' then
-       unix_w(jre_path()+"\bin\java.exe -cp "+SCI+"\modules\localization\tests\unit_tests CreateDir");
-else
-       unix_w(jre_path()+"/bin/java -classpath "+SCI+"/modules/localization/tests/unit_tests CreateDir");
-end
+exec(SCI+"/modules/localization/tests/unit_tests/CreateDir.sce", -1);
 chdir(TMPDIR);
 b = removedir("test_removedir");
 if (b <> %T) then bugmes();quit;end
index caf7c2e..0cd2d23 100644 (file)
@@ -18,11 +18,7 @@ a = createdir("test_removedir");
 if(a <> %T) then pause, end
 
 cd("test_removedir");
-if getos() == 'Windows' then
-       unix_w(jre_path()+"\bin\java.exe -cp "+SCI+"\modules\localization\tests\unit_tests CreateDir");
-else
-       unix_w(jre_path()+"/bin/java -classpath "+SCI+"/modules/localization/tests/unit_tests CreateDir");
-end
+exec(SCI+"/modules/localization/tests/unit_tests/CreateDir.sce", -1);
 
 chdir(TMPDIR);
 b = removedir("test_removedir");
index b4d77e6..886924a 100644 (file)
@@ -5,11 +5,7 @@
 //  This file is distributed under the same license as the Scilab package.
 // =============================================================================
 cd(TMPDIR);
-if getos() == 'Windows' then
-       unix_w(jre_path()+"\bin\java.exe -cp "+SCI+"\modules\localization\tests\unit_tests CreateDir");
-else
-       unix_w(jre_path()+"/bin/java -classpath "+SCI+"/modules/localization/tests/unit_tests CreateDir");
-end
+exec(SCI+"/modules/localization/tests/unit_tests/CreateDir.sce", -1);
 tab_ref = [
 "世界您好",
 "азеазея",
index 1fb5a81..eaf9f55 100644 (file)
@@ -7,11 +7,8 @@
 
 cd(TMPDIR);
 
-if getos() == 'Windows' then
-       unix_w(jre_path()+"\bin\java.exe -cp "+SCI+"\modules\localization\tests\unit_tests CreateDir");
-else
-       unix_w(jre_path()+"/bin/java -classpath "+SCI+"/modules/localization/tests/unit_tests CreateDir");
-end
+exec(SCI+"/modules/localization/tests/unit_tests/CreateDir.sce", -1);
+
 
 tab_ref = [
 "世界您好",
index db0f5ac..f3be5b9 100644 (file)
@@ -23,11 +23,7 @@ xlfont('reset');
 afterresetfonts = xlfont();
 if ~and(initialfonts == afterresetfonts) then bugmes();quit;end
 cd(TMPDIR);
-if getos() == 'Windows' then
-       unix_w(jre_path()+"\bin\java.exe -cp "+SCI+"\modules\localization\tests\unit_tests CreateDir");
-else
-       unix_w(jre_path()+"/bin/java -classpath "+SCI+"/modules/localization/tests/unit_tests CreateDir");
-end
+exec(SCI+"/modules/localization/tests/unit_tests/CreateDir.sce", -1);
 tab_ref = [
 "世界您好",
 "азеазея",
index 950d0b5..5121ee8 100644 (file)
@@ -34,11 +34,7 @@ if ~and(initialfonts == afterresetfonts) then pause,end
 
 cd(TMPDIR);
 
-if getos() == 'Windows' then
-       unix_w(jre_path()+"\bin\java.exe -cp "+SCI+"\modules\localization\tests\unit_tests CreateDir");
-else
-       unix_w(jre_path()+"/bin/java -classpath "+SCI+"/modules/localization/tests/unit_tests CreateDir");
-end
+exec(SCI+"/modules/localization/tests/unit_tests/CreateDir.sce", -1);
 
 tab_ref = [
 "世界您好",
index 66c7b36..492076f 100644 (file)
@@ -5,11 +5,7 @@
 //  This file is distributed under the same license as the Scilab package.
 // =============================================================================
 cd(TMPDIR);
-if getos() == 'Windows' then
-       unix_w(jre_path()+"\bin\java.exe -cp "+SCI+"\modules\localization\tests\unit_tests CreateDir");
-else
-       unix_w(jre_path()+"/bin/java -classpath "+SCI+"/modules/localization/tests/unit_tests CreateDir");
-end
+exec(SCI+"/modules/localization/tests/unit_tests/CreateDir.sce", -1);
 tab_ref = [
 "世界您好",
 "азеазея",
index a43ee3c..321bca0 100644 (file)
@@ -7,11 +7,8 @@
 
 cd(TMPDIR);
 
-if getos() == 'Windows' then
-       unix_w(jre_path()+"\bin\java.exe -cp "+SCI+"\modules\localization\tests\unit_tests CreateDir");
-else
-       unix_w(jre_path()+"/bin/java -classpath "+SCI+"/modules/localization/tests/unit_tests CreateDir");
-end
+exec(SCI+"/modules/localization/tests/unit_tests/CreateDir.sce", -1);
+
 
 tab_ref = [
 "世界您好",
index 2c15779..6aaa568 100644 (file)
@@ -5,14 +5,8 @@
 //  This file is distributed under the same license as the Scilab package.
 // =============================================================================
 ilib_verbose(0);
-mydir = TMPDIR + filesep() + "loadlib";
-createdir(mydir);
-chdir(mydir);
-if getos() == 'Windows' then
-       unix_w(jre_path()+"\bin\java.exe -cp "+SCI+"\modules\localization\tests\unit_tests CreateDir");
-else
-       unix_w(jre_path()+"/bin/java -classpath "+SCI+"/modules/localization/tests/unit_tests CreateDir");
-end
+chdir(TMPDIR);
+exec(SCI+"/modules/localization/tests/unit_tests/CreateDir.sce", -1);
 fileC = ['void test(){}'];
 tab_ref = [
 "世界您好",
@@ -25,24 +19,23 @@ tab_ref = [
 "תוכנית"];
 PathOrigin = getenv("PATH");
 if getos() == 'Windows' then
-for i = 1 : size(tab_ref,'*')
-       sz = "dir_" + tab_ref(i);
-       a = chdir(sz);
-       if(a <> %T) then pause, end
-       szTemp = getshortpathname(mydir + filesep() + sz);
-       NewPath = PathOrigin + ";" + szTemp;
-       setenv("PATH", NewPath);
-       mputl(fileC,'test.c');
-       ilib_for_link('test','test.c',[],"c");
-       chdir(SCI);
-       commandstr = "link(" + """libtest" + getdynlibext() +""")";
-       ierr = execstr(commandstr,"errcatch");
-       if(ierr <> 0) then bugmes();quit;end
-       ulink();
-       setenv("PATH", PathOrigin);
-       chdir(mydir);
-end
+  for i = 1 : size(tab_ref,'*')
+    sz = "dir_" + tab_ref(i);
+    a = chdir(sz);
+    assert_checkequal(a, %T);
+    szTemp = getshortpathname(TMPDIR + filesep() + sz);
+    NewPath = PathOrigin + ";" + szTemp;
+    setenv("PATH", NewPath);
+    mputl(fileC,'test.c');
+    ilib_for_link('test','test.c',[],"c");
+    chdir(SCI);
+    commandstr = "link(" + """libtest" + getdynlibext() +""")";
+    ierr = execstr(commandstr, "errcatch");
+    assert_checkequal(ierr, 0);
+    ulink();
+    setenv("PATH", PathOrigin);
+    chdir(TMPDIR);
+  end
 end
 sleep(2000);
 chdir(TMPDIR);
-removedir(mydir);
index c79444a..eb85e6d 100644 (file)
@@ -8,20 +8,12 @@
 
 ilib_verbose(0);
 
-mydir = TMPDIR + filesep() + "loadlib";
-createdir(mydir);
-chdir(mydir);
+chdir(TMPDIR);
 
-if getos() == 'Windows' then
-       unix_w(jre_path()+"\bin\java.exe -cp "+SCI+"\modules\localization\tests\unit_tests CreateDir");
-else
-       unix_w(jre_path()+"/bin/java -classpath "+SCI+"/modules/localization/tests/unit_tests CreateDir");
-end
+exec(SCI+"/modules/localization/tests/unit_tests/CreateDir.sce", -1);
 
 fileC = ['void test(){}'];
 
-
-
 tab_ref = [
 "世界您好",
 "азеазея",
@@ -36,25 +28,25 @@ PathOrigin = getenv("PATH");
 
 if getos() == 'Windows' then
 
-for i = 1 : size(tab_ref,'*')
-       sz = "dir_" + tab_ref(i);
-       a = chdir(sz);
-       if(a <> %T) then pause, end
-       szTemp = getshortpathname(mydir + filesep() + sz);
-       NewPath = PathOrigin + ";" + szTemp;
-       setenv("PATH", NewPath);
-       mputl(fileC,'test.c');
-       ilib_for_link('test','test.c',[],"c");
-       chdir(SCI);
-       commandstr = "link(" + """libtest" + getdynlibext() +""")";
-       ierr = execstr(commandstr,"errcatch");
-       if(ierr <> 0) then pause, end
-       ulink();
-       setenv("PATH", PathOrigin);
-       chdir(mydir);
-end
+  for i = 1 : size(tab_ref,'*')
+    sz = "dir_" + tab_ref(i);
+    a = chdir(sz);
+    assert_checkequal(a, %T);
+    szTemp = getshortpathname(TMPDIR + filesep() + sz);
+    NewPath = PathOrigin + ";" + szTemp;
+    setenv("PATH", NewPath);
+    mputl(fileC,'test.c');
+    ilib_for_link('test','test.c',[],"c");
+    chdir(SCI);
+    commandstr = "link(" + """libtest" + getdynlibext() +""")";
+    ierr = execstr(commandstr, "errcatch");
+    assert_checkequal(ierr, 0);
+    ulink();
+    setenv("PATH", PathOrigin);
+    chdir(TMPDIR);
+  end
 
 end
 sleep(2000);
 chdir(TMPDIR);
-removedir(mydir);
+
diff --git a/scilab/modules/localization/tests/unit_tests/CreateDir.class b/scilab/modules/localization/tests/unit_tests/CreateDir.class
deleted file mode 100644 (file)
index ede425f..0000000
Binary files a/scilab/modules/localization/tests/unit_tests/CreateDir.class and /dev/null differ
diff --git a/scilab/modules/localization/tests/unit_tests/CreateDir.java b/scilab/modules/localization/tests/unit_tests/CreateDir.java
deleted file mode 100644 (file)
index d8e1dcb..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-import java.io.*;
-class CreateDir
-{
-    public static void main(String[] args) throws IOException
-    {
-        process("Simplified Chinese"  , "世界您好");
-        process("Cyrillic"            , "азеазея");
-        process("amharique"           , "ድቅስድቅስግ");
-        process("Japanese"            , "ハロー・ワールド");
-        process("Thai"                , "เฮลโลเวิลด์");
-        process("Arabish"             , "حريات وحقوق");
-        process("Korean"              , "프로그램");
-        process("Vietanmien"          , "프로그램");
-        process("Malien"              , "ഹലോ വേള്‍ഡ");
-        process("Hebreu"              , "תוכנית");
-    }
-    
-    public static void process(String language , String strToUse) throws IOException
-    {
-        try
-        {
-            String dirpath     = "dir_"+strToUse;
-            String filepath    = "dir_"+strToUse+"/file_"+strToUse;
-            String filecontent = "str_"+strToUse+" : "+language;
-            
-            File d = new File(dirpath);
-            File f = new File(filepath);
-            
-            if( ! d.exists() )
-            {
-                d.mkdir();
-            }
-            
-            if( ! f.exists() )
-            {
-                f.createNewFile();
-            }
-            
-            OutputStreamWriter out = new OutputStreamWriter(new FileOutputStream(f) , "UTF-8");
-            out.write(filecontent);
-            out.close();
-        }
-        catch(Exception e)
-        {
-            System.err.println("Error: " + e.getMessage());
-        }
-    }
-}
diff --git a/scilab/modules/localization/tests/unit_tests/CreateDir.sce b/scilab/modules/localization/tests/unit_tests/CreateDir.sce
new file mode 100644 (file)
index 0000000..0f2b3dc
--- /dev/null
@@ -0,0 +1,39 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2012 - DIGITEO - Allan CORNET
+//
+//  This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+function CreateDir_test()
+  TST_LANG = ["Simplified Chinese"  , "世界您好"; ..
+            "Cyrillic"            , "азеазея"; ..
+            "amharique"           , "ድቅስድቅስግ"; ..
+            "Japanese"            , "ハロー・ワールド"; ..
+            "Thai"                , "เฮลโลเวิลด์"; ..
+            "Arabish"             , "حريات وحقوق"; ..
+            "Korean"              , "프로그램"; ..
+            "Vietanmien"          , "프로그램"; ..
+            "Malien"              , "ഹലോ വേള്‍ഡ"; ..
+            "Hebreu"              , "תוכנית"]; 
+
+  for i = 1:size(TST_LANG,'r')
+    DIR_TST = TMPDIR + "/dir_" + TST_LANG(i, 2);
+    mkdir(DIR_TST);
+    if ~isdir(DIR_TST) then 
+      error(999, 'directory did not create');
+    end
+    FILENAME_TST = DIR_TST + "/" + "file_" + TST_LANG(i, 2);
+    STR_TST = "str_" + TST_LANG(i, 2) + " : " + TST_LANG(i, 1);
+    fd = mopen(FILENAME_TST, "wt");
+    mfprintf(fd, "%s", STR_TST);
+    mclose(fd);
+    if ~isfile(FILENAME_TST) then 
+      error(999, 'file  did not create');
+    end
+  end
+endfunction
+
+CreateDir_test();
+clear CreateDir_test;
index 1978082..058e89a 100644 (file)
@@ -7,8 +7,4 @@
 // Create all needed directories
 //==============================
 chdir(TMPDIR);
-if getos() == 'Windows' then
-       unix_w(jre_path()+"\bin\java.exe -cp "+SCI+"\modules\localization\tests\unit_tests CreateDir");
-else
-       unix_w(jre_path()+"/bin/java -classpath "+SCI+"/modules/localization/tests/unit_tests CreateDir");
-end
+exec(SCI+"/modules/localization/tests/unit_tests/CreateDir.sce", -1);
index 40585c6..c567e44 100644 (file)
@@ -11,8 +11,4 @@
 
 chdir(TMPDIR);
 
-if getos() == 'Windows' then
-       unix_w(jre_path()+"\bin\java.exe -cp "+SCI+"\modules\localization\tests\unit_tests CreateDir");
-else
-       unix_w(jre_path()+"/bin/java -classpath "+SCI+"/modules/localization/tests/unit_tests CreateDir");
-end
+exec(SCI+"/modules/localization/tests/unit_tests/CreateDir.sce", -1);