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 <noreply@anthropic.com>
This commit is contained in:
Taylor Eernisse
2026-02-13 22:34:01 -05:00
parent 450951dee1
commit ebf64816c9

View File

@@ -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, "\"*\"");