comparison 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
comparison
equal deleted inserted replaced
12641:9bfc37e699da 12643:55430618bd5f
130 elseif (strcmp (__flag, "grabdemo")) 130 elseif (strcmp (__flag, "grabdemo"))
131 __grabdemo = 1; 131 __grabdemo = 1;
132 __rundemo = 0; 132 __rundemo = 0;
133 __verbose = 0; 133 __verbose = 0;
134 __demo_code = ""; 134 __demo_code = "";
135 __demo_idx = 1; 135 __demo_idx = [];
136 elseif (strcmp (__flag, "explain")) 136 elseif (strcmp (__flag, "explain"))
137 fprintf (__fid, "# %s new test file\n", __signal_file); 137 fprintf (__fid, "# %s new test file\n", __signal_file);
138 fprintf (__fid, "# %s no tests in file\n", __signal_empty); 138 fprintf (__fid, "# %s no tests in file\n", __signal_empty);
139 fprintf (__fid, "# %s test had an unexpected result\n", __signal_fail); 139 fprintf (__fid, "# %s test had an unexpected result\n", __signal_fail);
140 fprintf (__fid, "# %s code for the test\n", __signal_block); 140 fprintf (__fid, "# %s code for the test\n", __signal_block);