Mercurial > hg > octave-lyh
comparison 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 |
comparison
equal
deleted
inserted
replaced
14181:6b28e8a8c777 | 14182:f8d99761244c |
---|---|
454 __code = ""; | 454 __code = ""; |
455 | 455 |
456 ### TESTIF | 456 ### TESTIF |
457 | 457 |
458 elseif (strcmp (__type, "testif")) | 458 elseif (strcmp (__type, "testif")) |
459 [__e, __feat] = regexp (__code, '^\s*(\S+)', 'end', 'tokens'); | 459 __e = regexp (__code, '.$', 'lineanchors', 'once'); |
460 if (isempty (findstr (octave_config_info ("DEFS"), __feat{1}{1}))) | 460 __feat = regexp (__code(1:__e), '\w+', 'match'); |
461 __have_feat = strfind (octave_config_info ("DEFS"), __feat); | |
462 if (any (cellfun ("isempty", __have_feat))) | |
461 __xskip++; | 463 __xskip++; |
462 __istest = 0; | 464 __istest = 0; |
463 __code = ""; # Skip the code. | 465 __code = ""; # Skip the code. |
464 __msg = sprintf ("%sskipped test\n", __signal_skip); | 466 __msg = sprintf ("%sskipped test\n", __signal_skip); |
465 else | 467 else |