aboutsummaryrefslogtreecommitdiff
path: root/tests/app/Models
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2024-11-02 01:02:12 +0100
committerGravatar GitHub <noreply@github.com> 2024-11-02 01:02:12 +0100
commitdf28324c34dbbcde8ac4859e8e94314d29e1a409 (patch)
tree7d082e62af4e163486146bab804baa1dc4f7a534 /tests/app/Models
parentb7bff9484fe313e8503ed4effae839573b3a8539 (diff)
Fix regex search for tags (#6972)
https://github.com/FreshRSS/FreshRSS/issues/6949#issuecomment-2452363378
Diffstat (limited to 'tests/app/Models')
-rw-r--r--tests/app/Models/SearchTest.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/app/Models/SearchTest.php b/tests/app/Models/SearchTest.php
index 403c2c98e..8ff98a8e8 100644
--- a/tests/app/Models/SearchTest.php
+++ b/tests/app/Models/SearchTest.php
@@ -525,6 +525,11 @@ class SearchTest extends PHPUnit\Framework\TestCase {
'(NOT e.title ~ ? AND NOT e.content ~ ? )',
['^ab$', '^ab$']
],
+ [
+ '#/^a(b|c)$/im',
+ "(REPLACE(REPLACE(e.tags, ' #', '#'), '#', '\n') ~* ? )",
+ ['(?m)^a(b|c)$']
+ ],
[ // Not a regex
'inurl:https://example.net/test/',
'(e.link LIKE ? )',