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:
@@ -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, "\"*\"");
|
||||
|
||||
Reference in New Issue
Block a user