# HG changeset patch # User Rik # Date 1578335880 28800 # Node ID 695bb9322a21baa31ef6fc4fbca0f11891580edb # Parent a044e50c8dcbacbdef368095b1fba2ef43b8a860 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. diff -r a044e50c8dcb -r 695bb9322a21 scripts/testfun/oruntests.m --- 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");