summaryrefslogtreecommitdiff
path: root/modules/jvm/tests
diff options
context:
space:
mode:
authorShashank2017-05-29 12:40:26 +0530
committerShashank2017-05-29 12:40:26 +0530
commit0345245e860375a32c9a437c4a9d9cae807134e9 (patch)
treead51ecbfa7bcd3cc5f09834f1bb8c08feaa526a4 /modules/jvm/tests
downloadscilab_for_xcos_on_cloud-0345245e860375a32c9a437c4a9d9cae807134e9.tar.gz
scilab_for_xcos_on_cloud-0345245e860375a32c9a437c4a9d9cae807134e9.tar.bz2
scilab_for_xcos_on_cloud-0345245e860375a32c9a437c4a9d9cae807134e9.zip
CMSCOPE changed
Diffstat (limited to 'modules/jvm/tests')
-rwxr-xr-xmodules/jvm/tests/nonreg_tests/bug_3607.dia.ref19
-rwxr-xr-xmodules/jvm/tests/nonreg_tests/bug_3607.tst23
-rwxr-xr-xmodules/jvm/tests/unit_tests/javaclasspath.dia.ref13
-rwxr-xr-xmodules/jvm/tests/unit_tests/javaclasspath.tst16
-rwxr-xr-xmodules/jvm/tests/unit_tests/javalibrarypath.dia.ref13
-rwxr-xr-xmodules/jvm/tests/unit_tests/javalibrarypath.tst16
-rwxr-xr-xmodules/jvm/tests/unit_tests/system_setproperty.dia.ref24
-rwxr-xr-xmodules/jvm/tests/unit_tests/system_setproperty.tst31
8 files changed, 155 insertions, 0 deletions
diff --git a/modules/jvm/tests/nonreg_tests/bug_3607.dia.ref b/modules/jvm/tests/nonreg_tests/bug_3607.dia.ref
new file mode 100755
index 000000000..3b8e5ac0b
--- /dev/null
+++ b/modules/jvm/tests/nonreg_tests/bug_3607.dia.ref
@@ -0,0 +1,19 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - DIGITEO - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+// <-- Non-regression test for bug 3607 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=3607
+//
+// <-- Short Description -->
+// wrong value <option value="-Xmx1024m"/>
+res = mgetl(SCI+'/etc/jvm_options.xml');
+line = grep(res,'<option value=""-Xmx');
+assert_checkequal(stripblanks(res(line)) ,'<option value=""-Xmx256m""/>');
+stacksize('max');
+memstack = stacksize();
+if memstack < 1e8 then bugmes();quit;end
diff --git a/modules/jvm/tests/nonreg_tests/bug_3607.tst b/modules/jvm/tests/nonreg_tests/bug_3607.tst
new file mode 100755
index 000000000..cb7f36255
--- /dev/null
+++ b/modules/jvm/tests/nonreg_tests/bug_3607.tst
@@ -0,0 +1,23 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - DIGITEO - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- Non-regression test for bug 3607 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=3607
+//
+// <-- Short Description -->
+// wrong value <option value="-Xmx1024m"/>
+
+
+res = mgetl(SCI+'/etc/jvm_options.xml');
+line = grep(res,'<option value=""-Xmx');
+assert_checkequal(stripblanks(res(line)) ,'<option value=""-Xmx256m""/>');
+
+stacksize('max');
+memstack = stacksize();
+if memstack < 1e8 then pause,end
diff --git a/modules/jvm/tests/unit_tests/javaclasspath.dia.ref b/modules/jvm/tests/unit_tests/javaclasspath.dia.ref
new file mode 100755
index 000000000..927c4a300
--- /dev/null
+++ b/modules/jvm/tests/unit_tests/javaclasspath.dia.ref
@@ -0,0 +1,13 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2011 - DIGITEO - Sylvestre LEDRU
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+ierr = execstr('a = javaclasspath(2);','errcatch');
+if ierr <> 999 then bugmes();quit;end
+result = javaclasspath();
+if size(result,"*") < 1 then bugmes();quit;end
+// Does not return anything
+ierr = execstr('javaclasspath(TMPDIR);;','errcatch');
+if ierr <> 0 then bugmes();quit;end
diff --git a/modules/jvm/tests/unit_tests/javaclasspath.tst b/modules/jvm/tests/unit_tests/javaclasspath.tst
new file mode 100755
index 000000000..ab7ddb25b
--- /dev/null
+++ b/modules/jvm/tests/unit_tests/javaclasspath.tst
@@ -0,0 +1,16 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2011 - DIGITEO - Sylvestre LEDRU
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+ierr = execstr('a = javaclasspath(2);','errcatch');
+if ierr <> 999 then pause,end
+
+result = javaclasspath();
+if size(result,"*") < 1 then pause, end
+
+// Does not return anything
+ierr = execstr('javaclasspath(TMPDIR);;','errcatch');
+if ierr <> 0 then pause,end
diff --git a/modules/jvm/tests/unit_tests/javalibrarypath.dia.ref b/modules/jvm/tests/unit_tests/javalibrarypath.dia.ref
new file mode 100755
index 000000000..e5cb6c244
--- /dev/null
+++ b/modules/jvm/tests/unit_tests/javalibrarypath.dia.ref
@@ -0,0 +1,13 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2011 - DIGITEO - Sylvestre LEDRU
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+ierr = execstr('a = javalibrarypath(2);','errcatch');
+if ierr <> 999 then bugmes();quit;end
+result = javalibrarypath();
+if size(result,"*") < 1 then bugmes();quit;end
+// Does not return anything
+ierr = execstr('javalibrarypath(TMPDIR);;','errcatch');
+if ierr <> 0 then bugmes();quit;end
diff --git a/modules/jvm/tests/unit_tests/javalibrarypath.tst b/modules/jvm/tests/unit_tests/javalibrarypath.tst
new file mode 100755
index 000000000..b2ad5c1bc
--- /dev/null
+++ b/modules/jvm/tests/unit_tests/javalibrarypath.tst
@@ -0,0 +1,16 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2011 - DIGITEO - Sylvestre LEDRU
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+ierr = execstr('a = javalibrarypath(2);','errcatch');
+if ierr <> 999 then pause,end
+
+result = javalibrarypath();
+if size(result,"*") < 1 then pause, end
+
+// Does not return anything
+ierr = execstr('javalibrarypath(TMPDIR);;','errcatch');
+if ierr <> 0 then pause,end
diff --git a/modules/jvm/tests/unit_tests/system_setproperty.dia.ref b/modules/jvm/tests/unit_tests/system_setproperty.dia.ref
new file mode 100755
index 000000000..34ff31925
--- /dev/null
+++ b/modules/jvm/tests/unit_tests/system_setproperty.dia.ref
@@ -0,0 +1,24 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - DIGITEO
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+ierr = execstr('system_setproperty();','errcatch');
+if ierr <> 77 then bugmes();quit;end
+ierr = execstr('system_getproperty();','errcatch');
+if ierr <> 77 then bugmes();quit;end
+ierr = execstr('a = system_setproperty(''TOTO'',2);','errcatch');
+if ierr <> 999 then bugmes();quit;end
+r = system_getproperty('TOTO');
+if r <> 'unknown' then bugmes();quit;end
+ierr = execstr('a = system_setproperty(''TOTO'',''TATA'');','errcatch');
+if ierr <> 0 then bugmes();quit;end
+if a <> [] then bugmes();quit;end
+r = system_getproperty('TOTO');
+if r <> 'TATA' then bugmes();quit;end
+ierr = execstr('a = system_setproperty(''TOTO'',''TITI'');','errcatch');
+if ierr <> 0 then bugmes();quit;end
+if a <> 'TATA' then bugmes();quit;end
+r = system_getproperty('TOTO');
+if r <> 'TITI' then bugmes();quit;end
diff --git a/modules/jvm/tests/unit_tests/system_setproperty.tst b/modules/jvm/tests/unit_tests/system_setproperty.tst
new file mode 100755
index 000000000..5efc15ee6
--- /dev/null
+++ b/modules/jvm/tests/unit_tests/system_setproperty.tst
@@ -0,0 +1,31 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - DIGITEO
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+ierr = execstr('system_setproperty();','errcatch');
+if ierr <> 77 then pause,end
+
+ierr = execstr('system_getproperty();','errcatch');
+if ierr <> 77 then pause,end
+
+ierr = execstr('a = system_setproperty(''TOTO'',2);','errcatch');
+if ierr <> 999 then pause,end
+
+r = system_getproperty('TOTO');
+if r <> 'unknown' then pause,end
+
+ierr = execstr('a = system_setproperty(''TOTO'',''TATA'');','errcatch');
+if ierr <> 0 then pause,end
+if a <> [] then pause,end
+r = system_getproperty('TOTO');
+if r <> 'TATA' then pause,end
+
+
+ierr = execstr('a = system_setproperty(''TOTO'',''TITI'');','errcatch');
+if ierr <> 0 then pause,end
+if a <> 'TATA' then pause,end
+r = system_getproperty('TOTO');
+if r <> 'TITI' then pause,end