Skip to content

Commit 665be26

Browse files
AlexCodesAppslpil
authored andcommitted
included test and updated changelog
1 parent f7defd3 commit 665be26

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
- The `compare` and `to_int` functions from the `gleam/bool` module have been
66
deprecated.
7+
- Fixed a bug where `string.utf_codepoint` would erronously accept negative input.
78

89
## v0.46.0 - 2024-12-08
910

test/gleam/string_test.gleam

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,9 @@ pub fn utf_codepoint_test() {
706706

707707
string.utf_codepoint(55_296)
708708
|> should.be_error
709+
710+
string.utf_codepoint(-1)
711+
|> should.be_error
709712
}
710713

711714
pub fn bit_array_utf_codepoint_test() {

0 commit comments

Comments
 (0)