aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/gleam/string_test.gleam14
1 files changed, 14 insertions, 0 deletions
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([])
+}