diff scripts/testfun/test.m @ 8422:20cbb0fdab48

test.m: print "has no tests" message if there are demos but no tests
author John W. Eaton <jwe@octave.org>
date Wed, 24 Dec 2008 15:27:49 -0500
parents cf59d542f33e
children 00df69d7e698
line wrap: on
line diff
--- a/scripts/testfun/test.m
+++ b/scripts/testfun/test.m
@@ -506,14 +506,18 @@
   eval (__clear, "");
 
   if (nargout == 0)
-    if (__xfail)
-      printf ("PASSES %d out of %d tests (%d expected failures)\n",
-	      __successes, __tests, __xfail);
+    if (__tests || __xfail || __xskip)
+      if (__xfail)
+	printf ("PASSES %d out of %d tests (%d expected failures)\n",
+		__successes, __tests, __xfail);
+      else
+	printf ("PASSES %d out of %d tests\n", __successes, __tests);
+      endif
+      if (__xskip)
+	printf ("Skipped %d tests due to missing features\n", __xskip);
+      endif
     else
-      printf ("PASSES %d out of %d tests\n", __successes, __tests);
-    endif
-    if (__xskip)
-      printf ("Skipped %d tests due to missing features\n", __xskip);
+      printf ("%s%s has no tests available\n", __signal_empty, __file);
     endif
   elseif (__grabdemo)
     __ret1 = __demo_code;