changeset 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 b8ce8738a4d1
children 869e4213d5d9
files scripts/ChangeLog scripts/testfun/test.m
diffstat 2 files changed, 16 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog
+++ b/scripts/ChangeLog
@@ -1,3 +1,8 @@
+2008-12-24  John W. Eaton  <jwe@octave.org>
+
+	* testfun/test.m: Print "has no tests" message if there are demos
+	but no tests instead of printing PASSES 0 out of 0 tests.
+
 2008-12-23  David Bateman  <dbateman@free.fr>
 
 	* sparse/svds.m: New function.
--- 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;