# HG changeset patch # User Rafael Laboissiere # Date 1370367681 -7200 # Node ID 4e8f493040595c88b3cf81921fd01cdf66eb455a # Parent b59919bd2b0b25f5c017b5ec9ffb639cc61db210 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. diff --git a/scripts/testfun/test.m b/scripts/testfun/test.m --- 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);