changeset 23406:aab07d7e98be

make testif code and docs match * testfun.txi, test.m: Document proper placement of <bug-id> in %!testif blocks.
author John W. Eaton <jwe@octave.org>
date Mon, 17 Apr 2017 18:14:40 -0400
parents 32ec90068be5
children e265ae9e7a6c
files doc/interpreter/testfun.txi scripts/testfun/test.m
diffstat 2 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/doc/interpreter/testfun.txi	Mon Apr 17 17:44:56 2017 -0400
+++ b/doc/interpreter/testfun.txi	Mon Apr 17 18:14:40 2017 -0400
@@ -338,10 +338,13 @@
 
 @item %!testif HAVE_XXX
 @itemx %!testif HAVE_XXX, HAVE_YYY, @dots{}
+@itemx %!testif HAVE_XXX, HAVE_YYY @dots{}; RUNTIME_COND
 @itemx %!testif @dots{} <MESSAGE>
-Check block only if Octave was compiled with feature HAVE_XXX.  If
-@code{<MESSAGE>} is present, the test block is interpreted as for
-@code{xtest}.
+Check block only if Octave was compiled with feature @code{HAVE_XXX}.
+@code{RUNTIME_COND} is an optional expression to evaluate to check
+whether some condition is met when the test is executed.  If
+@code{RUNTIME_COND} is false, the test is skipped.  If @code{<MESSAGE>}
+is present, the test block is interpreted as for @code{xtest}.
 
 @item %!xtest
 @itemx %!xtest <MESSAGE>
--- a/scripts/testfun/test.m	Mon Apr 17 17:44:56 2017 -0400
+++ b/scripts/testfun/test.m	Mon Apr 17 18:14:40 2017 -0400
@@ -529,8 +529,8 @@
 
 ### TESTIF HAVE_FEATURE
 ### TESTIF HAVE_FEATURE ; RUNTIME_CONDITION
-### TESTIF <bug-id> HAVE_FEATURE
-### TESTIF <bug-id> HAVE_FEATURE ; RUNTIME_CONDITION
+### TESTIF HAVE_FEATURE <bug-id>
+### TESTIF HAVE_FEATURE ; RUNTIME_CONDITION <bug-id>
 ###
 ###   HAVE_FEATURE is a comma- or whitespace separated list of
 ###   macro names that may be checked with __have_feature__.