Mercurial > octave-nkf
comparison 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 |
comparison
equal
deleted
inserted
replaced
17459:f271fa40074d | 17460:9411ad1afa84 |
---|---|
108 if (n > 3 && strcmpi (f((end-2):end), ".cc")) | 108 if (n > 3 && strcmpi (f((end-2):end), ".cc")) |
109 fid = fopen (f); | 109 fid = fopen (f); |
110 if (fid >= 0) | 110 if (fid >= 0) |
111 str = fread (fid, "*char")'; | 111 str = fread (fid, "*char")'; |
112 fclose (fid); | 112 fclose (fid); |
113 retval = ! isempty (regexp (str,'^(DEFUN|DEFUN_DLD|DEFUNX)\>', | 113 retval = ! isempty (regexp (str,'^(?:DEFUN|DEFUN_DLD|DEFUNX)\>', |
114 'lineanchors', 'once')); | 114 'lineanchors', 'once')); |
115 else | 115 else |
116 error ("fopen failed: %s", f); | 116 error ("fopen failed: %s", f); |
117 endif | 117 endif |
118 elseif (n > 2 && strcmpi (f((end-1):end), ".m")) | 118 elseif (n > 2 && strcmpi (f((end-1):end), ".m")) |