aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorErik Terpstra <erterpstra@gmail.com>2020-05-22 14:56:05 +0200
committerLouis Pilfold <louis@lpil.uk>2020-05-22 19:46:45 +0100
commitc4470122c11d3b50234556f914927822455d47df (patch)
tree6a655bee54eafb5595379a4e512a830b8bedc2b3 /test
parent088ed8c9fcaaab0a434a29eb26175d4452f4b179 (diff)
downloadgleam_stdlib-c4470122c11d3b50234556f914927822455d47df.tar.gz
gleam_stdlib-c4470122c11d3b50234556f914927822455d47df.zip
string.to_graphemes
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([])
+}