This commit is contained in:
Flaviu Tamas
2015-06-16 20:10:32 -04:00
parent 17cace280c
commit 90292754f5
2 changed files with 7 additions and 2 deletions

View File

@@ -8,6 +8,7 @@ suite "string splitting":
check("1 2".split(re(" ")) == @["1", "2"])
check("foo".split(re("foo")) == @["", ""])
check("".split(re"foo") == @[""])
check("9".split(re"\son\s") == @["9"])
test "captured patterns":
check("12".split(re"(\d)") == @["", "1", "", "2", ""])