fix: preserve AND tag operator during search and suggestion draft completions (v2.0.10)

This commit is contained in:
2026-09-03 22:17:55 +03:00
parent 5560332b66
commit 7e384b1be7
8 changed files with 128 additions and 26 deletions
+11
View File
@@ -43,6 +43,17 @@ void main() {
expect(service.parseTags(' cat cute cat '), ['cat', 'cute']);
});
test('parses query preserving and operators and grouping', () {
expect(
service.parseTags('cat and dog and fox'),
['cat', 'and', 'dog', 'and', 'fox'],
);
expect(
service.parseTags('(cat and dog) anthro'),
['(cat', 'and', 'dog)', 'anthro'],
);
});
test('recent searches are ordered by searchedAt', () async {
await service.saveSearch('old', 1);
await Future<void>.delayed(const Duration(milliseconds: 1));