Mercurial > hg > octave-lyh
diff scripts/testfun/test.m @ 14182:f8d99761244c stable
test: Expand %!testif functionality to multiple conditions
* test.m: Add testing for multiple conditions in %!testif statement.
* svds.m, eigs.cc: Test for ARPACK and other libraries before running
some tests.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Mon, 09 Jan 2012 13:32:44 -0800 |
parents | 72c96de7a403 |
children | 68fd9f95e1f9 |
line wrap: on
line diff
--- a/scripts/testfun/test.m +++ b/scripts/testfun/test.m @@ -456,8 +456,10 @@ ### TESTIF elseif (strcmp (__type, "testif")) - [__e, __feat] = regexp (__code, '^\s*(\S+)', 'end', 'tokens'); - if (isempty (findstr (octave_config_info ("DEFS"), __feat{1}{1}))) + __e = regexp (__code, '.$', 'lineanchors', 'once'); + __feat = regexp (__code(1:__e), '\w+', 'match'); + __have_feat = strfind (octave_config_info ("DEFS"), __feat); + if (any (cellfun ("isempty", __have_feat))) __xskip++; __istest = 0; __code = ""; # Skip the code.