* Bug #13709 fixed - unique function sometimes returned wrong index values.
+* Bug #14025 fixed - head_comments did not take into account compiled functions.
error(msprintf(gettext("%s: Undefined variable %s.\n"),"head_comments",name )),
end
- if type(var) <> 11 then
+ if and(type(var) <> [11 13]) then
error(msprintf(gettext("%s: Wrong value for input argument #%d: Name of a Scilab function expected.\n"),"head_comments",1))
end
t = macr2tree(var);
--- /dev/null
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2015 - Scilab Enterprises - Charlotte Hecquet
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- Non-regression test for bug 14025 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=14025
+//
+// <-- Short Description -->
+// head_comments did not take into account compiled functions
+function test()
+ // heading comment L#1
+ // heading comment L#2
+ disp("test function");
+endfunction
+assert_checktrue(execstr("head_comments(""test"");", "errcatch") == 0);
+function [] = test()
+ heading comment L#1
+ heading comment L#2
--- /dev/null
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2015 - Scilab Enterprises - Charlotte Hecquet
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- Non-regression test for bug 14025 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=14025
+//
+// <-- Short Description -->
+// head_comments did not take into account compiled functions
+
+function test()
+ // heading comment L#1
+ // heading comment L#2
+ disp("test function");
+endfunction
+
+assert_checktrue(execstr("head_comments(""test"");", "errcatch") == 0);