From: Vincent COUVERT Date: Mon, 1 Jun 2015 12:46:35 +0000 (+0200) Subject: * Bug #13517 fixed - isdef crashed Scilab when called with a vector of strings X-Git-Tag: 6.0.0-alpha-1~229 X-Git-Url: http://gitweb.scilab.org/?p=scilab.git;a=commitdiff_plain;h=29f124ee0deb0c0251ce0991e46b557dccab3019 * Bug #13517 fixed - isdef crashed Scilab when called with a vector of strings as input in a function and after a declaration of variable. Fixed a long time ago, this commit only adds a non-regression test. Change-Id: Ic1c6ef53a8c0f71f198c5577302a9cc26de09d4b --- diff --git a/scilab/CHANGES_6.0.X b/scilab/CHANGES_6.0.X index 6f65cc1..dcb8cf7 100644 --- a/scilab/CHANGES_6.0.X +++ b/scilab/CHANGES_6.0.X @@ -71,3 +71,6 @@ Scilab Bug Fixes ================ * Bug #9621 fixed - A tlist with undefined fields can now be saved. + +* Bug #13517 fixed - isdef crashed Scilab when called with a vector of strings + as input in a function and after a declaration of variable. diff --git a/scilab/modules/core/tests/nonreg_tests/bug_13517.dia.ref b/scilab/modules/core/tests/nonreg_tests/bug_13517.dia.ref new file mode 100644 index 0000000..ad94703 --- /dev/null +++ b/scilab/modules/core/tests/nonreg_tests/bug_13517.dia.ref @@ -0,0 +1,25 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2015 - Scilab Enterprises - Vincent COUVERT +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// +// <-- Non-regression test for bug 13517 --> +// +// <-- CLI SHELL MODE --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/13517 +// +// <-- Short Description --> +// isdef fails with a vector of strings when she is used in a function and after +// a declaration of variable. +function bug_13517(str) + vn = 1; + isdef(str) +endfunction +ierr=execstr("bug_13517(""a"")", "errcatch"); +assert_checktrue(ierr==0); +ierr=execstr("bug_13517([""a"" ""b""])", "errcatch"); +assert_checktrue(ierr==0); diff --git a/scilab/modules/core/tests/nonreg_tests/bug_13517.tst b/scilab/modules/core/tests/nonreg_tests/bug_13517.tst new file mode 100644 index 0000000..e3dc41a --- /dev/null +++ b/scilab/modules/core/tests/nonreg_tests/bug_13517.tst @@ -0,0 +1,28 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2015 - Scilab Enterprises - Vincent COUVERT +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// +// <-- Non-regression test for bug 13517 --> +// +// <-- CLI SHELL MODE --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/13517 +// +// <-- Short Description --> +// isdef fails with a vector of strings when she is used in a function and after +// a declaration of variable. + +function bug_13517(str) + vn = 1; + isdef(str) +endfunction + +ierr=execstr("bug_13517(""a"")", "errcatch"); +assert_checktrue(ierr==0); + +ierr=execstr("bug_13517([""a"" ""b""])", "errcatch"); +assert_checktrue(ierr==0);