Mercurial > hg > octave-nkf
changeset 5845:8b4a99ae3b5e
[project @ 2006-06-07 18:11:24 by jwe]
author | jwe |
---|---|
date | Wed, 07 Jun 2006 18:11:24 +0000 |
parents | 034cdbd34c0a |
children | db0598f94c0f |
files | test/ChangeLog test/fntests.m |
diffstat | 2 files changed, 15 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,7 @@ +2006-06-07 John W. Eaton <jwe@octave.org> + + * fntests.m: Keep track of files with tests and report total. + 2006-06-01 John W. Eaton <jwe@octave.org> * fntests.m (print_test_file_name, print_pass_fail): New functions.
--- a/test/fntests.m +++ b/test/fntests.m @@ -1,6 +1,7 @@ clear all; global files_with_no_tests = {}; +global files_with_tests = {}; global topsrcdir; currdir = canonicalize_file_name ("."); @@ -49,6 +50,7 @@ endfunction function [dp, dn] = run_test_dir (fid, d); + global files_with_tests; global files_with_no_tests; lst = dir (d); dp = dn = 0; @@ -57,12 +59,14 @@ if (length (nm) > 5 && strcmp (nm(1:5), "test_") && strcmp (nm((end-1):end), ".m")) p = n = 0; - if (hastests (fullfile (d, nm))) + ffnm = fullfile (d, nm); + if (hastests (ffnm)) print_test_file_name (nm); [p, n] = test (nm(1:(end-2)), "quiet", fid); print_pass_fail (n, p); + files_with_tests(end+1) = ffnm; else - files_with_no_tests(end+1) = fullfile (d, nm); + files_with_no_tests(end+1) = ffnm; endif dp += p; dn += n; @@ -71,6 +75,7 @@ endfunction function [dp, dn] = run_test_script (fid, d); + global files_with_tests; global files_with_no_tests; global topsrcdir; lst = dir (d); @@ -97,6 +102,7 @@ print_pass_fail (n, p); dp += p; dn += n; + files_with_tests(end+1) = f; else files_with_no_tests(end+1) = f; endif @@ -148,7 +154,9 @@ printf ("\nSummary:\n\n PASS %6d\n", dp); nfail = dn - dp; printf (" FAIL %6d\n", nfail); - printf ("\n%d files have no tests\n", length (files_with_no_tests)); + n_files_with_no_tests = length (files_with_no_tests); + n_files = n_files_with_no_tests + length (files_with_tests); + printf ("\n%d (of %d) files have no tests\n", n_files_with_no_tests, n_files); fprintf (fid, "\nFiles with no tests:\n\n%s", list_in_columns (files_with_no_tests, 80)); fclose (fid);