diff scripts/testfun/test.m @ 12643:55430618bd5f

Properly warn when demo or example called on a function without demos * test.m: Return empty matrix if no demos present * demo.m, example.m: Update documentation. Warn when no demos present and return from function immediately.
author Rik <octave@nomad.inbox5.com>
date Mon, 02 May 2011 11:26:27 -0700
parents 890e89c3dfeb
children 6d4c18565de1
line wrap: on
line diff
--- a/scripts/testfun/test.m
+++ b/scripts/testfun/test.m
@@ -132,7 +132,7 @@
     __rundemo = 0;
     __verbose = 0;
     __demo_code = "";
-    __demo_idx = 1;
+    __demo_idx = [];
   elseif (strcmp (__flag, "explain"))
     fprintf (__fid, "# %s new test file\n", __signal_file);
     fprintf (__fid, "# %s no tests in file\n", __signal_empty);