diff options
author | inoas <mail@inoas.com> | 2022-11-05 14:59:55 +0100 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2022-11-06 17:08:23 +0000 |
commit | 48f322d660a3e5fe85392c6a82b1147e53c9357a (patch) | |
tree | 19b285023c09e826dacec3ade989ba239ca03d45 /test | |
parent | c22ffd9244f2c6bbfb560b6d637eabca08414e99 (diff) | |
download | gleam_stdlib-48f322d660a3e5fe85392c6a82b1147e53c9357a.tar.gz gleam_stdlib-48f322d660a3e5fe85392c6a82b1147e53c9357a.zip |
`string.split` will now return a list of graphemes if split on an empty
string (`""`)
Diffstat (limited to 'test')
-rw-r--r-- | test/gleam/string_test.gleam | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/gleam/string_test.gleam b/test/gleam/string_test.gleam index 13069f1..f330e6d 100644 --- a/test/gleam/string_test.gleam +++ b/test/gleam/string_test.gleam @@ -82,6 +82,12 @@ pub fn split_test() { "Gleam, Erlang,Elixir" |> string.split(", ") |> should.equal(["Gleam", "Erlang,Elixir"]) + + "Gleam On Beam" + |> string.split("") + |> should.equal([ + "G", "l", "e", "a", "m", " ", "O", "n", " ", "B", "e", "a", "m", + ]) } pub fn split_once_test() { |