changeset 30286:b8a8abd1b1ba

allow %!function defs in test blocks to have no parameter list * test.m (function_name): Set right position to end of def string if "(" is not found.
author John W. Eaton <jwe@octave.org>
date Fri, 12 Nov 2021 15:18:14 -0500
parents fca639cb78b8
children 6c7567bfac91
files scripts/testfun/test.m
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/testfun/test.m	Fri Nov 12 15:16:05 2021 -0500
+++ b/scripts/testfun/test.m	Fri Nov 12 15:18:14 2021 -0500
@@ -851,7 +851,7 @@
   ## Find the end of the name.
   right = find (def == "(", 1);
   if (isempty (right))
-    return;
+    right = numel (def);
   endif
   right = find (def(1:right-1) != " ", 1, "last");