Mercurial > octave-nkf
diff scripts/testfun/__run_test_suite__.m @ 16030:1af8d21608b7
rename all test files in the test directory from test_X.m to X.tst
* Use - instead of _ for .tst file names. Fix all file lists in
module.mk and Makefile.am files.
* __run_test_suite__.m: Adapt to new naming convention.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sat, 09 Feb 2013 21:35:55 -0500 |
parents | 5b2126a8c84f |
children | 12005245b645 |
line wrap: on
line diff
--- a/scripts/testfun/__run_test_suite__.m Sat Feb 09 20:05:40 2013 -0500 +++ b/scripts/testfun/__run_test_suite__.m Sat Feb 09 21:35:55 2013 -0500 @@ -23,8 +23,8 @@ function __run_test_suite__ (fcndirs, fixedtestdirs) testsdir = octave_config_info ("octtestsdir"); - libinterptestdir = fullfile (testsdir, "libinterp") - liboctavetestdir = fullfile (testsdir, "liboctave") + libinterptestdir = fullfile (testsdir, "libinterp"); + liboctavetestdir = fullfile (testsdir, "liboctave"); fixedtestdir = fullfile (testsdir, "fixed"); fcnfiledir = octave_config_info ("fcnfiledir"); if (nargin == 0) @@ -194,13 +194,12 @@ chdir (d); for i = 1:length (lst) nm = lst(i).name; - if (length (nm) > 5 && strcmp (nm(1:5), "test_") - && strcmp (nm((end-1):end), ".m")) + if (length (nm) > 4 && strcmp (nm((end-3):end), ".tst")) p = n = xf = sk = 0; ffnm = fullfile (d, nm); if (has_tests (ffnm)) print_test_file_name (nm); - [p, n, xf, sk] = test (nm(1:(end-2)), "quiet", fid); + [p, n, xf, sk] = test (nm, "quiet", fid); print_pass_fail (n, p); files_with_tests(end+1) = ffnm; ##elseif (has_demos (ffnm)) @@ -244,8 +243,10 @@ continue endif f = fullfile (d, nm); - if ((length (nm) > 2 && strcmp (nm((end-1):end), ".m")) || - (length (nm) > 4 && strcmp (nm((end-3):end), "-tst"))) + if ((length (nm) > 2 && strcmp (nm((end-1):end), ".m")) + || (length (nm) > 4 + && (strcmp (nm((end-3):end), "-tst") + || strcmp (nm((end-3):end), ".tst")))) p = n = xf = 0; ## Only run if it contains %!test, %!assert %!error or %!warning if (has_tests (f))