ending function in tests

Marco Atzeri <[email protected]>
Newsgroups gmane.comp.gnu.octave.maintainers
Message-ID <[email protected]>
Controlling the test results of odepkg

https://bitbucket.org/odepkg/odepkg/src/default/

with octave 5.2 on Cygwin I hit a strange error

***** end
!!!!! unknown test type!

the error is caused by ending functions with just "end"

%!function [ydot] = pendulum (vt, vy)
%!  ydot = [0.5*vy(length(vy)/2+1:end); 
-(2*5*9.806)*[zeros(length(vy)/4);ones(length(vy)/4)]];
%!end

of course replacing

    %!end
with
    %!endfunction

works, but also declaring a normal function with "end" works

function [ydot] = pendulum (vt, vy)
    ydot = [0.5*vy(length(vy)/2+1:end); 
-(2*5*9.806)*[zeros(length(vy)/4);ones(length(vy)/4)]];
end

as this maintain compatibility with Matlab.
Is this by design or should I open a bug ?

Regards
Marco
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.