diff options
| author | 2023-03-04 13:30:45 +0100 | |
|---|---|---|
| committer | 2023-03-04 13:30:45 +0100 | |
| commit | b3239256dc6d188cda970adab516b3fcf1b86129 (patch) | |
| tree | d8e65dd9784834ba2e82ce7ee94b4718f8af19ea /tests/app/Models/SearchTest.php | |
| parent | 27b71ffa99f7dff013fb8d51d020ed628e0d2ce6 (diff) | |
| parent | 0fe0ce894cbad09757d719dd4b400b9862c1a12a (diff) | |
Merge branch 'edge' into latest
Diffstat (limited to 'tests/app/Models/SearchTest.php')
| -rw-r--r-- | tests/app/Models/SearchTest.php | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/tests/app/Models/SearchTest.php b/tests/app/Models/SearchTest.php index a2832c710..52c10244d 100644 --- a/tests/app/Models/SearchTest.php +++ b/tests/app/Models/SearchTest.php @@ -318,17 +318,17 @@ class SearchTest extends PHPUnit\Framework\TestCase { ], [ '#tag Hello OR (author:Alice inurl:example) OR (f:3 intitle:World) OR L:12', - ' ((e.tags LIKE ? AND (e.title LIKE ? OR e.content LIKE ?) )) OR ((e.author LIKE ? AND e.link LIKE ? )) OR' . + " ((TRIM(e.tags) || ' #' LIKE ? AND (e.title LIKE ? OR e.content LIKE ?) )) OR ((e.author LIKE ? AND e.link LIKE ? )) OR" . ' ((e.id_feed IN (?) AND e.title LIKE ? )) OR ((e.id IN (SELECT et.id_entry FROM `_entrytag` et WHERE et.id_tag IN (?)) )) ', - ['%tag%','%Hello%', '%Hello%', '%Alice%', '%example%', '3', '%World%', '12'] + ['%tag #%','%Hello%', '%Hello%', '%Alice%', '%example%', '3', '%World%', '12'] ], [ '#tag Hello (author:Alice inurl:example) (f:3 intitle:World) label:Bleu', - ' ((e.tags LIKE ? AND (e.title LIKE ? OR e.content LIKE ?) )) AND' . + " ((TRIM(e.tags) || ' #' LIKE ? AND (e.title LIKE ? OR e.content LIKE ?) )) AND" . ' ((e.author LIKE ? AND e.link LIKE ? )) AND' . ' ((e.id_feed IN (?) AND e.title LIKE ? )) AND' . ' ((e.id IN (SELECT et.id_entry FROM `_entrytag` et, `_tag` t WHERE et.id_tag = t.id AND t.name IN (?)) )) ', - ['%tag%', '%Hello%', '%Hello%', '%Alice%', '%example%', '3', '%World%', 'Bleu'] + ['%tag #%', '%Hello%', '%Hello%', '%Alice%', '%example%', '3', '%World%', 'Bleu'] ], [ '!((author:Alice intitle:hello) OR (author:Bob intitle:world))', @@ -339,6 +339,11 @@ class SearchTest extends PHPUnit\Framework\TestCase { '(author:Alice intitle:hello) !(author:Bob intitle:world)', ' ((e.author LIKE ? AND e.title LIKE ? )) AND NOT ((e.author LIKE ? AND e.title LIKE ? )) ', ['%Alice%', '%hello%', '%Bob%', '%world%'], + ], + [ + 'intitle:"\\(test\\)"', + '(e.title LIKE ? )', + ['%\\(test\\)%'], ] ]; } |
