Mercurial > octave
changeset 27915:695bb9322a21
oruntests.m: validate .m/.cc names are actually files before testing.
* oruntests.m (run_all_tests): Use isfile() to guarantee possible name is
actually a file before calling fopen on it.
author | Rik <rik@octave.org> |
---|---|
date | Mon, 06 Jan 2020 10:38:00 -0800 |
parents | a044e50c8dcb |
children | 4a30a58a44ab |
files | scripts/testfun/oruntests.m |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/testfun/oruntests.m Mon Jan 06 10:18:00 2020 -0800 +++ b/scripts/testfun/oruntests.m Mon Jan 06 10:38:00 2020 -0800 @@ -71,6 +71,9 @@ if ((length (f) > 2 && strcmpi (f((end-1):end), ".m")) || (length (f) > 3 && strcmpi (f((end-2):end), ".cc"))) ff = fullfile (directory, f); + if (! isfile (ff)) + continue; + endif if (has_tests (ff)) print_test_file_name (f); [p, n, xf, xb, sk, rtsk, rgrs] = test (ff, "quiet");