Mercurial > octave
changeset 26627:f48e5c7f7ef7
verLessThan.m: edit doc examples and add BIST tests
* verLessThan.m: Add @result{} markup to doc examples to pass with doctest.
Use single digit style for Octave version number. Add BIST tests to ensure
single digit versions work.
author | Mike Miller <mtmiller@octave.org> |
---|---|
date | Thu, 24 Jan 2019 16:41:00 -0800 |
parents | 6a6a6ede86d3 |
children | fb100b270550 |
files | scripts/miscellaneous/verLessThan.m |
diffstat | 1 files changed, 9 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/miscellaneous/verLessThan.m Thu Jan 24 22:08:24 2019 +0000 +++ b/scripts/miscellaneous/verLessThan.m Thu Jan 24 16:41:00 2019 -0800 @@ -34,11 +34,14 @@ ## ## @example ## @group -## tf = verLessThan ("Octave", "5.0.0") -## tf = verLessThan ("io", "2.4.12") +## tf = verLessThan ("Octave", "5") +## @result{} tf = 0 ## -## if (! verLessThan ("Octave", "5.0.0")) -## ## ... use new Octave 5.0 features ... +## tf = verLessThan ("io", "2.4.12") +## @result{} ... +## +## if (! verLessThan ("Octave", "5")) +## ## ... use new Octave 5 features ... ## endif ## @end group ## @end example @@ -67,6 +70,8 @@ endfunction +%!assert (! verLessThan ("Octave", "0")) +%!assert (! verLessThan ("Octave", "6")) %!assert (! verLessThan ("Octave", "3.0.0")) %!assert (verLessThan ("Octave", "99.9.9"))