Mercurial > hg > octave-thorsten
changeset 13302:b68b354a39c2
strtrunc.m: Add %!test accidentally deleted in changeset 29a4d3b4211e
* strtrunc.m: Add %!test accidentally deleted in changeset 29a4d3b4211e
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Sat, 08 Oct 2011 18:54:53 -0700 |
parents | 29a4d3b4211e |
children | db15303ee267 |
files | scripts/strings/strtrunc.m |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/strings/strtrunc.m +++ b/scripts/strings/strtrunc.m @@ -52,6 +52,7 @@ %!assert (strtrunc("abcdefg", 10), "abcdefg"); %!assert (strtrunc(char ("abcdef", "fedcba"), 3), ["abc"; "fed"]); %!assert (strtrunc({"abcdef", "fedcba"}, 3), {"abc", "fed"}); +%!assert (strtrunc({"1", "21", "321"}, 1), {"1", "2", "3"}) %!test %! cstr = {"line1"; ["line2"; "line3"]; "line4"}; %! y = strtrunc (cstr, 4);