diff scripts/testfun/rundemos.m @ 17456:2c2a6801cb57

rundemos.m, runtests.m: Operate on .cc files (bug #40052) * rundemos.m, runtests.m: Copy logic from a previous version of fntests to operate on C++ source files for development use. Update docstrings.
author Mike Miller <mtmiller@ieee.org>
date Sat, 21 Sep 2013 07:33:49 -0400
parents fa14aa77b514
children a4f86f459744
line wrap: on
line diff
--- a/scripts/testfun/rundemos.m	Fri Sep 20 18:43:43 2013 -0400
+++ b/scripts/testfun/rundemos.m	Sat Sep 21 07:33:49 2013 -0400
@@ -20,6 +20,9 @@
 ## @deftypefn  {Function File} {} rundemos ()
 ## @deftypefnx {Function File} {} rundemos (@var{directory})
 ## Execute built-in demos for all function files in the specified directory.
+## Also executes demos in any C++ source files found in the directory, for
+## use with dynamically linked functions.
+##
 ## If no directory is specified, operate on all directories in Octave's
 ## search path for functions.
 ## @seealso{runtests, path}
@@ -62,7 +65,8 @@
   flist = readdir (directory);
   for i = 1:numel (flist)
     f = flist{i};
-    if (length (f) > 2 && strcmp (f((end-1):end), ".m"))
+    if ((length (f) > 2 && strcmpi (f((end-1):end), ".m")) ||
+        (length (f) > 3 && strcmpi (f((end-2):end), ".cc")))
       f = fullfile (directory, f);
       if (has_demos (f))
         try