From 0cb66846424fca2417bb31f49ca76dab65983722 Mon Sep 17 00:00:00 2001 From: Samuel GOUGEON Date: Sun, 28 Aug 2016 19:37:41 +0200 Subject: [PATCH] * Bug #10195 fixed: NR test added: execstr interpreted ascii(0->31) as ^ power http://bugzilla.scilab.org/10195 Change-Id: Ic3b34dca6a5ace4408b9a25c0a6e6a348dc98e7e --- scilab/CHANGES.md | 1 + .../functions/tests/nonreg_tests/bug_10195.dia.ref | 19 ++++++++++++++++++ .../functions/tests/nonreg_tests/bug_10195.tst | 21 ++++++++++++++++++++ 3 files changed, 41 insertions(+) create mode 100644 scilab/modules/functions/tests/nonreg_tests/bug_10195.dia.ref create mode 100644 scilab/modules/functions/tests/nonreg_tests/bug_10195.tst diff --git a/scilab/CHANGES.md b/scilab/CHANGES.md index 7a639ad..fa69f7c 100644 --- a/scilab/CHANGES.md +++ b/scilab/CHANGES.md @@ -341,6 +341,7 @@ Bug Fixes * [#9876](http://bugzilla.scilab.org/show_bug.cgi?id=9876): Creating a complex structure with multiple hierarchy level and size failed. * [#9912](http://bugzilla.scilab.org/show_bug.cgi?id=9912): In case of missing translated help page, the default en_US was sometimes ignored * [#10116](http://bugzilla.scilab.org/show_bug.cgi?id=10116): `for h = H, .., end` could not be used when H is a vector of graphic handles +* [#10195](http://bugzilla.scilab.org/show_bug.cgi?id=10195): `execstr` interpreted ascii(0) to ascii(31) characters as the power `^` operator. * [#10981](http://bugzilla.scilab.org/show_bug.cgi?id=10981): When the view property of Axes object is set at 2d, the rotation becomes impossible. * [#11375](http://bugzilla.scilab.org/show_bug.cgi?id=11375): When a localized help subdirectory has only a CHAPTER file specifying the section title, it was ignored. * [#11692](http://bugzilla.scilab.org/show_bug.cgi?id=11692): The summary of a help section built from both default en_US and localized files was never sorted overall. diff --git a/scilab/modules/functions/tests/nonreg_tests/bug_10195.dia.ref b/scilab/modules/functions/tests/nonreg_tests/bug_10195.dia.ref new file mode 100644 index 0000000..16b72d9 --- /dev/null +++ b/scilab/modules/functions/tests/nonreg_tests/bug_10195.dia.ref @@ -0,0 +1,19 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2016 - Samuel GOUGEON +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// <-- CLI SHELL MODE --> +// +// <-- Non-regression test for bug 10195 --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/10195 +// +// <-- Short Description --> +// execstr() interpreted ascii(0:31) as the power ^ operator +A = [1:9 11 12 14:25 27:31]; // ascii([0 10 13 26]) = EOL: OK +for a = A + assert_checkequal(execstr("b=2"+ascii(a)+"3", "errcatch"),999); +end diff --git a/scilab/modules/functions/tests/nonreg_tests/bug_10195.tst b/scilab/modules/functions/tests/nonreg_tests/bug_10195.tst new file mode 100644 index 0000000..df39a42 --- /dev/null +++ b/scilab/modules/functions/tests/nonreg_tests/bug_10195.tst @@ -0,0 +1,21 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2016 - Samuel GOUGEON +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= + +// <-- CLI SHELL MODE --> +// +// <-- Non-regression test for bug 10195 --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/10195 +// +// <-- Short Description --> +// execstr() interpreted ascii(0:31) as the power ^ operator + +A = [1:9 11 12 14:25 27:31]; // ascii([0 10 13 26]) = EOL: OK +for a = A + assert_checkequal(execstr("b=2"+ascii(a)+"3", "errcatch"),999); +end -- 1.7.9.5