aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLouis Pilfold <louis@lpil.uk>2024-08-19 17:16:25 +0100
committerLouis Pilfold <louis@lpil.uk>2024-08-19 17:16:25 +0100
commit9789d26a5faa2ff284448387f5c6ff5131fef275 (patch)
tree56af9c6e40207581addf2810c46a774c6647e807 /test
parent1962beacc59f37c1db782e79e90358cb14315c18 (diff)
downloadgleam_stdlib-9789d26a5faa2ff284448387f5c6ff5131fef275.tar.gz
gleam_stdlib-9789d26a5faa2ff284448387f5c6ff5131fef275.zip
Fix slice
Closes https://github.com/gleam-lang/gleam/issues/3499
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 e5a4904..6d3031e 100644
--- a/test/gleam/string_test.gleam
+++ b/test/gleam/string_test.gleam
@@ -465,6 +465,13 @@ pub fn drop_left_test() {
|> should.equal("gleam")
}
+pub fn drop_left_3499_test() {
+ // https://github.com/gleam-lang/gleam/issues/3499
+ "\r]"
+ |> string.drop_left(1)
+ |> should.equal("]")
+}
+
pub fn drop_right_test() {
"gleam"
|> string.drop_right(up_to: 2)