Mercurial > hg > octave-nkf
diff scripts/testfun/runtests.m @ 17460:9411ad1afa84
rundemos.m: Use regexp, instead of strfind, to report whether a file has_demos.
* scripts/testfun/rundemos.m: Use regexp so that occurrences of '%!demo',
possibly in comments, do not trigger running demos.
* scripts/testfun/runtests.m: Don't bother to capture regexp pattern which
is just discarded.
author | Rik <rik@octave.org> |
---|---|
date | Sun, 22 Sep 2013 09:27:56 -0700 |
parents | f271fa40074d |
children | d63878346099 |
line wrap: on
line diff
--- a/scripts/testfun/runtests.m +++ b/scripts/testfun/runtests.m @@ -110,7 +110,7 @@ if (fid >= 0) str = fread (fid, "*char")'; fclose (fid); - retval = ! isempty (regexp (str,'^(DEFUN|DEFUN_DLD|DEFUNX)\>', + retval = ! isempty (regexp (str,'^(?:DEFUN|DEFUN_DLD|DEFUNX)\>', 'lineanchors', 'once')); else error ("fopen failed: %s", f);