* Bug #9305 fixed - In the optimisation help page, new chapter "Least Squares functions"
created.
+* Bug #9934 fixed - clear([["A","B"]) returns a non standard error message.
+
* Bug #10278 fixed - clear(1) returns a wrong error message.
* Bug #10415 fixed - Remove a session line in history causes the removal
}
else
{
- Scierror(999, _("%s: Wrong size for argument %d: Valid variable name expected.\n"), fname, k + 1);
+ Scierror(999, _("%s: Wrong size for argument %d: A single string expected.\n"), fname, k + 1);
return 0;
}
}
--- /dev/null
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) Scilab Enterprises - 2012 - Simon MARCHETTO
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- Non-regression test for bug 9934 -->
+//
+// <-- JVM NOT MANDATORY -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=10278
+//
+// <-- Short Description -->
+// clear([A","B"]) returned a wrong error message
+ierr = execstr("clear([""A"",""B""])", "errcatch");
+assert_checkequal(ierr, 999);
+msg_ref = msprintf(gettext("%s: Wrong size for argument %d: A single string expected.\n"), "clear", 1);
+assert_checkerror ("clear([""A"",""B""])", msg_ref);
--- /dev/null
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) Scilab Enterprises - 2012 - Simon MARCHETTO
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- Non-regression test for bug 9934 -->
+//
+// <-- JVM NOT MANDATORY -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=10278
+//
+// <-- Short Description -->
+// clear(["A","B"]) returned a non standard error message
+
+ierr = execstr("clear([""A"",""B""])", "errcatch");
+assert_checkequal(ierr, 999);
+msg_ref = msprintf(gettext("%s: Wrong size for argument %d: A single string expected.\n"), "clear", 1);
+assert_checkerror ("clear([""A"",""B""])", msg_ref);
// =============================================================================
// <-- CLI SHELL MODE -->
//
+// <-- JVM NOT MANDATORY -->
A = 2;
B = 4;
C = 6;
assert_checkequal(ierr, 201);
msg_ref = msprintf(gettext("%s: Wrong type for argument %d: A single string expected.\n"), "clear", 1);
assert_checkerror ("clear(1)", msg_ref);
+ierr = execstr("clear([""A"",""B""])", "errcatch");
+assert_checkequal(ierr, 999);
+msg_ref = msprintf(gettext("%s: Wrong size for argument %d: A single string expected.\n"), "clear", 1);
+assert_checkerror ("clear([""A"",""B""])", msg_ref);
ierr = execstr("clear toto", "errcatch");
assert_checkequal(ierr, 0);
msg_ref = msprintf(gettext("%s: Wrong type for argument %d: A single string expected.\n"), "clear", 1);
assert_checkerror ("clear(1)", msg_ref);
+ierr = execstr("clear([""A"",""B""])", "errcatch");
+assert_checkequal(ierr, 999);
+msg_ref = msprintf(gettext("%s: Wrong size for argument %d: A single string expected.\n"), "clear", 1);
+assert_checkerror ("clear([""A"",""B""])", msg_ref);
+
ierr = execstr("clear toto", "errcatch");
assert_checkequal(ierr, 0);