mirror of
https://github.com/vlang/v.git
synced 2025-09-14 15:02:33 +03:00
9 lines
325 B
V
9 lines
325 B
V
import encoding.utf8.validate
|
|
|
|
fn test_validate_str() {
|
|
assert validate.utf8_string('añçá') == true
|
|
assert validate.utf8_string('\x61\xC3\xB1\xC3\xA7\xC3\xA1') == true
|
|
assert validate.utf8_string('\xC0\xC1') == false
|
|
assert validate.utf8_string('\xF5\xFF') == false
|
|
assert validate.utf8_string('\xE0\xEF') == false
|
|
}
|