From c4470122c11d3b50234556f914927822455d47df Mon Sep 17 00:00:00 2001 From: Erik Terpstra Date: Fri, 22 May 2020 14:56:05 +0200 Subject: string.to_graphemes --- test/gleam/string_test.gleam | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'test') diff --git a/test/gleam/string_test.gleam b/test/gleam/string_test.gleam index c8eae63..2fbb84f 100644 --- a/test/gleam/string_test.gleam +++ b/test/gleam/string_test.gleam @@ -267,3 +267,17 @@ pub fn pop_grapheme_test() { |> string.pop_grapheme() |> should.equal(Error(Nil)) } + +pub fn to_graphemes_test() { + "abc" + |> string.to_graphemes() + |> should.equal(["a", "b", "c"]) + + "a" + |> string.to_graphemes() + |> should.equal(["a"]) + + "" + |> string.to_graphemes() + |> should.equal([]) +} -- cgit v1.2.3