mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
style: Make starts_with_ignore_ascii_case not lie if the strings are the same length.
This commit is contained in:
parent
d8a22d8bd7
commit
9e00efc8a5
2 changed files with 7 additions and 1 deletions
|
@ -34,6 +34,12 @@ pub fn test_str_join_many() {
|
|||
assert_eq!(actual, expected);
|
||||
}
|
||||
|
||||
#[test]
|
||||
pub fn test_starts_with_ignore_ascii_case_basic() {
|
||||
assert!(starts_with_ignore_ascii_case("-webkit-", "-webkit-"));
|
||||
assert!(starts_with_ignore_ascii_case("-webkit-foo", "-webkit-"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
pub fn test_starts_with_ignore_ascii_case_char_boundary() {
|
||||
assert!(!starts_with_ignore_ascii_case("aaaaa💩", "-webkit-"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue