mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-08-02 11:50:03 +00:00
style(milli): linting
This commit is contained in:
@ -398,8 +398,10 @@ mod tests {
|
|||||||
let cyrillic_typos = nbr_typos(cyrillic_word);
|
let cyrillic_typos = nbr_typos(cyrillic_word);
|
||||||
|
|
||||||
// Both words have 5 characters, so they should have the same typo tolerance
|
// Both words have 5 characters, so they should have the same typo tolerance
|
||||||
assert_eq!(ascii_typos, cyrillic_typos,
|
assert_eq!(
|
||||||
"Words with same character count should get same typo tolerance");
|
ascii_typos, cyrillic_typos,
|
||||||
|
"Words with same character count should get same typo tolerance"
|
||||||
|
);
|
||||||
|
|
||||||
// With default settings (oneTypo=5, twoTypos=9), 5-char words should get 1 typo
|
// With default settings (oneTypo=5, twoTypos=9), 5-char words should get 1 typo
|
||||||
assert_eq!(ascii_typos, 1, "5-character word should get 1 typo tolerance");
|
assert_eq!(ascii_typos, 1, "5-character word should get 1 typo tolerance");
|
||||||
@ -427,8 +429,11 @@ mod tests {
|
|||||||
|
|
||||||
for (word, script) in five_char_words {
|
for (word, script) in five_char_words {
|
||||||
let typos = nbr_typos(word);
|
let typos = nbr_typos(word);
|
||||||
assert_eq!(typos, expected_typos,
|
assert_eq!(
|
||||||
"{} word '{}' should get {} typo(s)", script, word, expected_typos);
|
typos, expected_typos,
|
||||||
|
"{} word '{}' should get {} typo(s)",
|
||||||
|
script, word, expected_typos
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
Reference in New Issue
Block a user