Mercurial > hg > octave-nkf
changeset 16992:4e8f49304059
test.m: Use correct English singular/plural in reporting messages (bug #39164).
* scripts/testfun/test.m: Test number of successes or failures and add an
's' to messages (plural) if there is more than one.
author | Rafael Laboissiere <rafael@laboissiere.net> |
---|---|
date | Tue, 04 Jun 2013 19:41:21 +0200 |
parents | b59919bd2b0b |
children | 78f57b14535c |
files | scripts/testfun/test.m |
diffstat | 1 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/testfun/test.m +++ b/scripts/testfun/test.m @@ -579,13 +579,16 @@ if (nargout == 0) if (__tests || __xfail || __xskip) if (__xfail) - printf ("PASSES %d out of %d tests (%d expected failures)\n", - __successes, __tests, __xfail); + printf ("PASSES %d out of %d test%s (%d expected failure%s)\n", + __successes, __tests, ifelse (__tests > 1, "s", ""), + __xfail, ifelse (__xfail > 1, "s", "")); else - printf ("PASSES %d out of %d tests\n", __successes, __tests); + printf ("PASSES %d out of %d test%s\n", __successes, __tests, + ifelse (__tests > 1, "s", "")); endif if (__xskip) - printf ("Skipped %d tests due to missing features\n", __xskip); + printf ("Skipped %d test%s due to missing features\n", __xskip, + ifelse (__xskip > 1, "s", "")); endif else printf ("%s%s has no tests available\n", __signal_empty, __file);