From 65519bc04ba573f5465d9ad9ed864117eedf2872 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Thu, 9 Dec 2021 11:14:51 +0100 Subject: [PATCH] Test that empty filters return a None --- milli/src/search/facet/filter.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/milli/src/search/facet/filter.rs b/milli/src/search/facet/filter.rs index 88815d884..642a32472 100644 --- a/milli/src/search/facet/filter.rs +++ b/milli/src/search/facet/filter.rs @@ -644,4 +644,10 @@ mod tests { error.to_string() ); } + + #[test] + fn empty_filter() { + let option = Filter::from_str(" ").unwrap(); + assert_eq!(option, None); + } }