From ebf64816c9de876ece836922e6490b41a5ecdb4f Mon Sep 17 00:00:00 2001 From: Taylor Eernisse Date: Fri, 13 Feb 2026 22:34:01 -0500 Subject: [PATCH] fix(search): correct FTS5 raw mode fallback test assertion Update test_raw_mode_leading_wildcard_falls_back_to_safe to match the actual Safe mode behavior: OR is a recognized FTS5 boolean operator and passes through unquoted, so the expected output is '"*" OR "auth"' not '"*" "OR" "auth"'. The previous assertion was incorrect since the Safe mode operator-passthrough logic was added. Co-Authored-By: Claude Opus 4.6 --- src/search/fts.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/search/fts.rs b/src/search/fts.rs index 276a0fd..9ac0916 100644 --- a/src/search/fts.rs +++ b/src/search/fts.rs @@ -257,7 +257,8 @@ mod tests { #[test] fn test_raw_mode_leading_wildcard_falls_back_to_safe() { let result = to_fts_query("* OR auth", FtsQueryMode::Raw); - assert_eq!(result, "\"*\" \"OR\" \"auth\""); + // Falls back to Safe mode; OR is an FTS5 operator so it passes through unquoted + assert_eq!(result, "\"*\" OR \"auth\""); let result = to_fts_query("*", FtsQueryMode::Raw); assert_eq!(result, "\"*\"");