From be75e738b1bd4d28099892a89723c21cd7d2758e Mon Sep 17 00:00:00 2001 From: Tamo Date: Tue, 29 Jun 2021 16:18:53 +0200 Subject: [PATCH] add more tests --- milli/src/search/matching_words.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/milli/src/search/matching_words.rs b/milli/src/search/matching_words.rs index 22e63edfa..9aad52110 100644 --- a/milli/src/search/matching_words.rs +++ b/milli/src/search/matching_words.rs @@ -222,6 +222,22 @@ mod tests { TestBytesToHighlight { query: "Båve", text: "Chiøt", length: "Bå".len() }, TestBytesToHighlight { query: "💪🙂🍤", text: "plouf", length: "💪🙂".len() }, TestBytesToHighlight { query: "clôu¿i", text: "bloubi", length: "clôu".len() }, + TestBytesToHighlight { + query: "Альфа", text: "Альфой", length: "Альфа".len() + }, + TestBytesToHighlight { + query: "Go💼", text: "Go💼od luck.", length: "Go💼".len() + }, + TestBytesToHighlight { + query: "Go💼od", text: "Go💼od luck.", length: "Go💼od".len() + }, + TestBytesToHighlight { + query: "chäräcters", + text: "chäräcters", + length: "chäräcters".len(), + }, + TestBytesToHighlight { query: "ch", text: "chäräcters", length: "ch".len() }, + TestBytesToHighlight { query: "chär", text: "chäräcters", length: "chär".len() }, ]; for test in &tests {