From e85d977985e48dd5f76db564ee8e978a3118bb20 Mon Sep 17 00:00:00 2001 From: Mathias Jean Johansen Date: Mon, 2 May 2022 17:00:26 +0200 Subject: Add tests using unicode strings. --- test/gleam/string_test.gleam | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test') diff --git a/test/gleam/string_test.gleam b/test/gleam/string_test.gleam index 14b034c..31c93ad 100644 --- a/test/gleam/string_test.gleam +++ b/test/gleam/string_test.gleam @@ -373,6 +373,10 @@ pub fn first_test() { "gleam" |> string.first |> should.equal(Some("g")) + + "⭐️ Gleam" + |> string.first + |> should.equal(Some("⭐️")) } pub fn last_test() { @@ -387,6 +391,10 @@ pub fn last_test() { "gleam " |> string.last |> should.equal(Some(" ")) + + "եոգլի" + |> string.last + |> should.equal(Some("ի")) } pub fn capitalize_test() { @@ -417,4 +425,8 @@ pub fn capitalize_test() { " gLeAm1" |> string.capitalize |> should.equal(" gleam1") + + "る" + |> string.capitalize + |> should.equal("る") } -- cgit v1.2.3