Mercurial > hg > octave-lyh
diff src/pt-mat.cc @ 12842:a52b4e9f45e3
codesprint: new tests for pt-mat.cc
* pt-mat.cc (Fstring_fill_char): New tests.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sat, 16 Jul 2011 18:05:35 -0400 |
parents | 7a5aacf65f81 |
children | 213c791292a6 |
line wrap: on
line diff
--- a/src/pt-mat.cc +++ b/src/pt-mat.cc @@ -1146,3 +1146,15 @@ { return SET_INTERNAL_VARIABLE (string_fill_char); } + +/* +%!error (string_fill_char (1, 2)); +%!test +%! orig_val = string_fill_char (); +%! old_val = string_fill_char ("X"); +%! assert (orig_val, old_val); +%! assert (string_fill_char (), "X"); +%! assert (["these"; "are"; "strings"], ["theseXX"; "areXXXX"; "strings"]); +%! string_fill_char (orig_val); +%! assert (string_fill_char (), orig_val); +*/