summaryrefslogtreecommitdiff
path: root/tests/it.t
diff options
context:
space:
mode:
Diffstat (limited to 'tests/it.t')
-rwxr-xr-xtests/it.t8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/it.t b/tests/it.t
index 0c02106..77bab72 100755
--- a/tests/it.t
+++ b/tests/it.t
@@ -442,3 +442,11 @@ is(it::map('2*$v', ['foo' => 1, 'bar' => 2], ['keys' => 'foo']), ['foo' => 2, 'b
is(it::add_dir("foo/bar"), "foo/37/bar");
is(it::add_dir("baz/bar"), "baz/37/bar");
is(it::add_dir("bar"), "./37/bar");
+
+is(it::split("b", "aba"), ["a", "a"]);
+is(it::split("b", "aBa"), ["a", "a"]);
+is(it::split("b", "abba"), ["a", "", "a"]);
+is(it::split("b", "ababa", ['limit' => 2]), ["a", "aba"]);
+is(it::split("b", "abbba", ['no_empty' => true]), ["a", "a"]);
+is(it::split("(b)", "aba", ['delim_capture' => true]), ["a", "b", "a"]);
+is(it::split("b", "aabaa", ['offset_capture' => true]), [["aa", 0], ["aa", 3]]);