test: add regression tests for quoted phrases with reserved words #1108
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
The known issue "Quoted Phrases Don't Escape Operators" was already fixed in a previous commit. This PR adds regression tests and documents the resolution.
Changes
tests/Core.Tests/Search/SearchEndToEndTests.cs: Added 7 E2E regression tests:KnownIssue2_QuotedPhraseWithAND_FindsExactPhraseKnownIssue2_QuotedPhraseWithOR_FindsExactPhraseKnownIssue2_QuotedPhraseWithNOT_FindsExactPhraseKnownIssue2_QuotedReservedWordAND_FindsDocumentsContainingANDKnownIssue2_QuotedReservedWordOR_FindsDocumentsContainingORKnownIssue2_QuotedReservedWordNOT_FindsDocumentsContainingNOTKnownIssue2_MixedQuotedPhraseAndOperator_WorksCorrectlyKNOWN-ISSUES.md: Moved issue to "Resolved Issues" sectiontests/Main.Tests/Integration/ExamplesCommandE2ETests.cs: Updated commentsHow it works
The tokenizer in
InfixQueryParser.cscorrectly identifies quoted strings and preserves their content as literal text. The FTS query extractor properly quotes phrases and escapes reserved words when generating FTS5 queries.Test plan
build.shpasses with 0 warningsformat.shpassescoverage.shpasses