diff scripts/testfun/test.m @ 14190:68fd9f95e1f9 stable

Don't process comments in %!testif specifications. * test.m: Strip comments before processing testif specification line. * build_sparse_tests.sh: Make comments on %!testif lines look attractive.
author Rik <octave@nomad.inbox5.com>
date Tue, 10 Jan 2012 18:10:33 -0800
parents f8d99761244c
children 11949c9795a0
line wrap: on
line diff
--- a/scripts/testfun/test.m
+++ b/scripts/testfun/test.m
@@ -457,7 +457,9 @@
 
     elseif (strcmp (__type, "testif"))
       __e = regexp (__code, '.$', 'lineanchors', 'once');
-      __feat = regexp (__code(1:__e), '\w+', 'match');
+      ## Strip comment any comment from testif line before looking for features
+      __feat_line = strtok (__code(1:__e), '#%'); 
+      __feat = regexp (__feat_line, '\w+', 'match');
       __have_feat = strfind (octave_config_info ("DEFS"), __feat); 
       if (any (cellfun ("isempty", __have_feat)))
         __xskip++;