aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2024-05-25 23:14:05 -0400
committerLouis Pilfold <louis@lpil.uk>2024-06-05 10:31:47 +0100
commitb464e46886e6c61d9cb5d7f0f5d5edb1bbdc55a0 (patch)
treee28c89e973315f994bd52b1237054cabbe5a49fc /test
parentd2ed555a99239ead90c6366adc87b720bc5b1916 (diff)
downloadgleam_stdlib-b464e46886e6c61d9cb5d7f0f5d5edb1bbdc55a0.tar.gz
gleam_stdlib-b464e46886e6c61d9cb5d7f0f5d5edb1bbdc55a0.zip
Add test for javascript and erlang trimming mismatch
Diffstat (limited to 'test')
-rw-r--r--test/gleam/string_test.gleam7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/gleam/string_test.gleam b/test/gleam/string_test.gleam
index f3c56a8..c18d77a 100644
--- a/test/gleam/string_test.gleam
+++ b/test/gleam/string_test.gleam
@@ -176,6 +176,13 @@ pub fn trim_right_test() {
|> should.equal(" hats")
}
+pub fn trim_unicode_test() {
+ // unicode spaces
+ "hats a "
+ |> string.trim
+ |> should.equal("hats a ")
+}
+
pub fn starts_with_test() {
"theory"
|> string.starts_with("")