Skip to content

Commit

Permalink
encoding.ut8: remove deprecated tests for utf8.is_uchar_punct/1 and…
Browse files Browse the repository at this point in the history
… `utf8.get_uchar/2` (fix #23599) (#23600)
  • Loading branch information
lcheylus authored Jan 27, 2025
1 parent 4eeae1c commit 81fd0db
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions vlib/encoding/utf8/utf8_util_test.v
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ fn test_utf8_util() {
a := '.abc?abcòàè.'
assert utf8.is_punct(a, 0) == true
assert utf8.is_punct('b', 0) == false
assert utf8.is_uchar_punct(0x002E) == true // Test deprecated
assert utf8.is_rune_punct(0x002E) == true
assert utf8.is_punct(a, 4) == true // ?
assert utf8.is_punct(a, 14) == true // last .
Expand All @@ -34,13 +33,12 @@ fn test_utf8_util() {
b := '.ĂĂa. ÔÔ TESTO Æ€'
assert utf8.is_global_punct(b, 0) == true
assert utf8.is_global_punct('.', 0) == true
assert utf8.is_uchar_punct(0x002E) == true // Test deprecated
assert utf8.is_rune_punct(0x002E) == true
assert utf8.is_global_punct(b, 6) == true // .
assert utf8.is_global_punct(b, 1) == false // a

// test utility functions
assert utf8.get_uchar(b, 0) == 0x002E // Test deprecated
assert utf8.get_rune(b, 0) == 0x002E
c := 'a©★🚀'
assert utf8.get_rune(c, 0) == `a` // 1 byte
assert utf8.get_rune(c, 1) == `©` // 2 bytes
Expand Down

0 comments on commit 81fd0db

Please sign in to comment.