changeset 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 69c63a234b14
children 3035c2e130de
files src/pt-mat.cc
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
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);
+*/