From: Samuel GOUGEON Date: Fri, 6 Oct 2017 22:10:18 +0000 (+0200) Subject: * Bug 5602 (+NR test): assignment in a list in a cell replaced the whole list X-Git-Tag: 6.0.1~206 X-Git-Url: http://gitweb.scilab.org/?p=scilab.git;a=commitdiff_plain;h=843f3ceadaacb1116dee1077d65b3d64f9024b1d * Bug 5602 (+NR test): assignment in a list in a cell replaced the whole list http://bugzilla.scilab.org/5602 Change-Id: I8b052f94ecb8a1635e1e341e68acdc5977b5bc26 --- diff --git a/scilab/CHANGES.md b/scilab/CHANGES.md index 10bc6cf..1138e6f 100644 --- a/scilab/CHANGES.md +++ b/scilab/CHANGES.md @@ -368,6 +368,7 @@ the [development mailing list](dev@lists.scilab.org) for a particular toolbox. * [#4276](http://bugzilla.scilab.org/show_bug.cgi?id=4276): `strsubst` replaced the first occurence in regex mode. * [#5248](http://bugzilla.scilab.org/show_bug.cgi?id=5248): The graphical entity picker was out of work. * [#5278](http://bugzilla.scilab.org/show_bug.cgi?id=5278): obsolete `xset()` was still used in scripts, macros, tests and help pages. +* [#5602](http://bugzilla.scilab.org/show_bug.cgi?id=5602): Assigning a component of a list in a cells array replaced the whole list. * [#5611](http://bugzilla.scilab.org/show_bug.cgi?id=5611): It was not possible to delete the row or column of a cells array. * [#8297](http://bugzilla.scilab.org/show_bug.cgi?id=8297): `cat` slowness was exponential, crippling, and made it useless. * [#8842](http://bugzilla.scilab.org/show_bug.cgi?id=8842): Assigning the pointer of a builtin function to a new structure failed. diff --git a/scilab/modules/data_structures/tests/nonreg_tests/bug_5602.tst b/scilab/modules/data_structures/tests/nonreg_tests/bug_5602.tst new file mode 100644 index 0000000..c691a56 --- /dev/null +++ b/scilab/modules/data_structures/tests/nonreg_tests/bug_5602.tst @@ -0,0 +1,24 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2017 - Samuel GOUGEON +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= + +// <-- CLI SHELL MODE --> +// <-- NO CHECK REF --> + +// <-- Non-regression test for bug 5602 --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/5602 +// +// <-- Short Description --> +// Changing a component of a list in a cells array replaced the whole list with +// the insertion + +c = {%i, list("ok", %z)}; +c{1,2}(2) = %z^2; +assert_checkequal(c{1,2}, list("ok", %z^2)); + +assert_checkfalse(execstr("c(1,2)(2)", "errcatch")==0);