comparison 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
comparison
equal deleted inserted replaced
14189:c27491205e48 14190:68fd9f95e1f9
455 455
456 ### TESTIF 456 ### TESTIF
457 457
458 elseif (strcmp (__type, "testif")) 458 elseif (strcmp (__type, "testif"))
459 __e = regexp (__code, '.$', 'lineanchors', 'once'); 459 __e = regexp (__code, '.$', 'lineanchors', 'once');
460 __feat = regexp (__code(1:__e), '\w+', 'match'); 460 ## Strip comment any comment from testif line before looking for features
461 __feat_line = strtok (__code(1:__e), '#%');
462 __feat = regexp (__feat_line, '\w+', 'match');
461 __have_feat = strfind (octave_config_info ("DEFS"), __feat); 463 __have_feat = strfind (octave_config_info ("DEFS"), __feat);
462 if (any (cellfun ("isempty", __have_feat))) 464 if (any (cellfun ("isempty", __have_feat)))
463 __xskip++; 465 __xskip++;
464 __istest = 0; 466 __istest = 0;
465 __code = ""; # Skip the code. 467 __code = ""; # Skip the code.