comparison scripts/testfun/test.m @ 15521:bcace51598ed

Improve demo() to warn when an input function does not exist. * demo.m: Check return code from test to see whether function exists and issue a warning if it does not. * test.m: Return -1 for second retval when grabdemo option given and function does not exist.
author Rik <rik@octave.org>
date Sun, 14 Oct 2012 20:18:22 -0700
parents d8acad691f26
children
comparison
equal deleted inserted replaced
15520:f915996325b7 15521:bcace51598ed
169 endif 169 endif
170 endif 170 endif
171 if (isempty (__file)) 171 if (isempty (__file))
172 if (__grabdemo) 172 if (__grabdemo)
173 __ret1 = ""; 173 __ret1 = "";
174 __ret2 = []; 174 __ret2 = -1;
175 else 175 else
176 if (exist (__name) == 3) 176 if (exist (__name) == 3)
177 fprintf (__fid, "%s%s source code with tests for dynamically linked function not found\n", __signal_empty, __name); 177 fprintf (__fid, "%s%s source code with tests for dynamically linked function not found\n", __signal_empty, __name);
178 else 178 else
179 fprintf (__fid, "%s%s does not exist in path\n", __signal_empty, __name); 179 fprintf (__fid, "%s%s does not exist in path\n", __signal_empty, __name);