Mercurial > octave
changeset 29037:495af8064428
maint: merge stable to default.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Fri, 06 Nov 2020 14:30:07 +0100 |
parents | 8e6ddf23dcea (current diff) b71672c8d337 (diff) |
children | bf62eeabf6d1 |
files | scripts/testfun/test.m |
diffstat | 1 files changed, 8 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/testfun/test.m Thu Nov 05 16:50:55 2020 -0800 +++ b/scripts/testfun/test.m Fri Nov 06 14:30:07 2020 +0100 @@ -212,14 +212,15 @@ error ("test: unknown flag '%s'", __flag); endif - ## Locate the file to test. + ## Locate the file with tests. __file = file_in_loadpath (__name, "all"); - if (isempty (__file)) - __file = file_in_loadpath ([__name ".m"], "all"); - endif - if (isempty (__file)) - __file = file_in_loadpath ([__name ".cc"], "all"); - endif + for suffix = {".m", ".cc", ".cc-tst", ".c-tst", ".C-tst", ".cpp-tst", ... + ".cxx-tst"} + if (! isempty (__file)) + break; + endif + __file = file_in_loadpath ([__name, suffix{1}], "all"); + endfor if (iscell (__file)) if (isempty (__file)) __file = "";