Mercurial > hg > octave-terminal
changeset 13303:db15303ee267
substr.m: Fix failing %!test for 0 length.
* substr.m: Fix failing %!test for 0 length.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Sat, 08 Oct 2011 19:58:29 -0700 |
parents | b68b354a39c2 |
children | e1524d82f8e0 |
files | scripts/strings/substr.m |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/strings/substr.m +++ b/scripts/strings/substr.m @@ -97,7 +97,7 @@ %!assert (substr ("This is a test string", -11, 4), "test"); %!assert (substr ("This is a test string", -11, -7), "test"); %!assert (substr ("This is a test string", 1, -7), "This is a test"); -%!assert (substr ("This is a test string", 1, 0), ""); +%!assert (isempty (substr ("This is a test string", 1, 0))); %% Test input validation %!error substr ()