diff scripts/strings/split.m @ 7411:83a8781b529d

[project @ 2008-01-22 21:52:25 by jwe]
author jwe
date Tue, 22 Jan 2008 21:52:26 +0000
parents a1dbe9d80eee
children dadf478ddc42
line wrap: on
line diff
--- a/scripts/strings/split.m
+++ b/scripts/strings/split.m
@@ -98,3 +98,12 @@
   endif
 
 endfunction
+
+%!assert(all (all (split ("Test string", "t") == ["Tes "; " s  "; "ring"])));
+
+%!error split ();
+
+%!assert(all (strcmp (split ("foo bar baz", " ", 2), ["foo"; "bar baz"])));
+
+%!error split ("foo", "bar", 3, 4);
+