# HG changeset patch # User Rik # Date 1311107718 25200 # Node ID 213c791292a66b0b8f3ab1413df3eae7e14eec50 # Parent 8f9702abe3e3419c36d1fc6cce6df4d497ec6daf test: Add 3 tests for string_fill_char() * pt-mat.cc: Add 3 tests for string_fill_char() diff --git a/src/pt-mat.cc b/src/pt-mat.cc --- a/src/pt-mat.cc +++ b/src/pt-mat.cc @@ -1149,9 +1149,12 @@ /* %!error (string_fill_char (1, 2)); -%!test +%% string_fill_char() function call must be outside of %!test block +%% due to the way a %!test block is wrapped inside a function +%!shared orig_val, old_val %! orig_val = string_fill_char (); -%! old_val = string_fill_char ("X"); +%! old_val = string_fill_char ("X"); +%!test %! assert (orig_val, old_val); %! assert (string_fill_char (), "X"); %! assert (["these"; "are"; "strings"], ["theseXX"; "areXXXX"; "strings"]);