Mercurial > hg > octave-lyh
diff src/utils.cc @ 13140:98d23b0f16e1
maint: move test_string.m tests to source files
* utils.cc (Fdo_string_escapes, Fundo_string_escapes):
New tests from test_string.m.
* strfns.cc (Fchar, Fischar, Fstrcmp): New tests from test_string.m.
(Fischar): New tests from test_string.m.
* mappers.cc (Ftoascii, Ftolower, Ftoupper, Fisalnum, Fisalpha,
Fisascii, Fiscntrl, Fisdigit, Fisgraph, Fislower, Fisprint, Fispunct,
Fisspace, Fisupper, Fisxdigit): New tests from test_string.m.
* pt-mat.cc: Move string concatenation tests here from test_string.m.
* test_string.m: Delete.
* test/Makefile.am (FCN_FILES): Remove test_string.m from the list.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 15 Sep 2011 12:02:54 -0400 |
parents | 40f935b15a22 |
children | 6ead4dc1ca55 |
line wrap: on
line diff
--- a/src/utils.cc +++ b/src/utils.cc @@ -678,11 +678,13 @@ %!assert (do_string_escapes ('foo\nbar'), "foo\nbar"); %!assert (do_string_escapes ("foo\\nbar"), "foo\nbar"); %!assert (do_string_escapes ("foo\\nbar"), ["foo", char(10), "bar"]); +%!assert ("foo\nbar", ["foo", char(10), "bar"]); %!assert (do_string_escapes ('\a\b\f\n\r\t\v'), "\a\b\f\n\r\t\v"); %!assert (do_string_escapes ("\\a\\b\\f\\n\\r\\t\\v"), "\a\b\f\n\r\t\v"); %!assert (do_string_escapes ("\\a\\b\\f\\n\\r\\t\\v"), %! char ([7, 8, 12, 10, 13, 9, 11])); +%!assert ("\a\b\f\n\r\t\v", char ([7, 8, 12, 10, 13, 9, 11])); */ const char *