diff options
author | Louis Pilfold <louis@lpil.uk> | 2021-08-26 22:38:32 +0100 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2021-08-27 00:37:15 +0100 |
commit | 70f065415469c65dd7f66dd4ef3f8e651f16b66a (patch) | |
tree | 9c016d6874f17c309723a7d89b7f445940d12c06 /test | |
parent | cb80cf508ac0990038ec6ee6cd90cb61eaeabe5c (diff) | |
download | gleam_stdlib-70f065415469c65dd7f66dd4ef3f8e651f16b66a.tar.gz gleam_stdlib-70f065415469c65dd7f66dd4ef3f8e651f16b66a.zip |
Regex split
Diffstat (limited to 'test')
-rw-r--r-- | test/gleam/regex_test.gleam | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/gleam/regex_test.gleam b/test/gleam/regex_test.gleam index 367b810..87535a0 100644 --- a/test/gleam/regex_test.gleam +++ b/test/gleam/regex_test.gleam @@ -1,4 +1,4 @@ -import gleam/regex.{CompileError, Match, Options} +import gleam/regex.{Match, Options} import gleam/should import gleam/io import gleam/option.{None, Some} @@ -39,14 +39,14 @@ pub fn check_test() { |> should.equal(False) } -if erlang { - pub fn split_test() { - assert Ok(re) = regex.from_string(" *, *") +pub fn split_test() { + assert Ok(re) = regex.from_string(" *, *") - regex.split(re, "foo,32, 4, 9 ,0") - |> should.equal(["foo", "32", "4", "9", "0"]) - } + regex.split(re, "foo,32, 4, 9 ,0") + |> should.equal(["foo", "32", "4", "9", "0"]) +} +if erlang { pub fn scan_test() { assert Ok(re) = regex.from_string("Gl\\w+") |