diff options
author | Shashank | 2017-05-29 12:40:26 +0530 |
---|---|---|
committer | Shashank | 2017-05-29 12:40:26 +0530 |
commit | 0345245e860375a32c9a437c4a9d9cae807134e9 (patch) | |
tree | ad51ecbfa7bcd3cc5f09834f1bb8c08feaa526a4 /modules/jvm/tests | |
download | scilab_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-x | modules/jvm/tests/nonreg_tests/bug_3607.dia.ref | 19 | ||||
-rwxr-xr-x | modules/jvm/tests/nonreg_tests/bug_3607.tst | 23 | ||||
-rwxr-xr-x | modules/jvm/tests/unit_tests/javaclasspath.dia.ref | 13 | ||||
-rwxr-xr-x | modules/jvm/tests/unit_tests/javaclasspath.tst | 16 | ||||
-rwxr-xr-x | modules/jvm/tests/unit_tests/javalibrarypath.dia.ref | 13 | ||||
-rwxr-xr-x | modules/jvm/tests/unit_tests/javalibrarypath.tst | 16 | ||||
-rwxr-xr-x | modules/jvm/tests/unit_tests/system_setproperty.dia.ref | 24 | ||||
-rwxr-xr-x | modules/jvm/tests/unit_tests/system_setproperty.tst | 31 |
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 |