diff options
author | AlexCodesApps <141887614+AlexCodesApps@users.noreply.github.com> | 2024-12-17 15:55:37 +0100 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2024-12-17 15:09:50 +0000 |
commit | 665be265b91bef1c5aa00de30435d8b7c20e7f27 (patch) | |
tree | 878f46dc15640cefa7a5c9d7c24a87ef3448e8ee | |
parent | f7defd37174e160b66fec01a53f2be56eb530ecd (diff) | |
download | gleam_stdlib-665be265b91bef1c5aa00de30435d8b7c20e7f27.tar.gz gleam_stdlib-665be265b91bef1c5aa00de30435d8b7c20e7f27.zip |
included test and updated changelog
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | test/gleam/string_test.gleam | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 90ad8d1..c1eaddb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - The `compare` and `to_int` functions from the `gleam/bool` module have been deprecated. +- Fixed a bug where `string.utf_codepoint` would erronously accept negative input. ## v0.46.0 - 2024-12-08 diff --git a/test/gleam/string_test.gleam b/test/gleam/string_test.gleam index 8ff4f39..ffd2f9b 100644 --- a/test/gleam/string_test.gleam +++ b/test/gleam/string_test.gleam @@ -706,6 +706,9 @@ pub fn utf_codepoint_test() { string.utf_codepoint(55_296) |> should.be_error + + string.utf_codepoint(-1) + |> should.be_error } pub fn bit_array_utf_codepoint_test() { |