aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2022-03-21 12:51:03 +0100
committerGravatar GitHub <noreply@github.com> 2022-03-21 12:51:03 +0100
commit4d153eeaf85905e8402cc8d175f202967d909020 (patch)
tree194ea90f602899d25be4243f188e10c3b13d6fda /tests
parenta89fce27cbc3f3cdfe0cbc10f1ba63a85efa8ebb (diff)
Fix some search expressions (#4277)
* Fix some search expressions * Fix decoding bug when using quotes to search free text containing some spaces such as `"ab cd"` * Fix use of `-` wrongly triggering a negative search in e.g. `ab-cd` * Fix edge cases * A couple of tests
Diffstat (limited to 'tests')
-rw-r--r--tests/app/Models/SearchTest.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/app/Models/SearchTest.php b/tests/app/Models/SearchTest.php
index bef548b02..b43834147 100644
--- a/tests/app/Models/SearchTest.php
+++ b/tests/app/Models/SearchTest.php
@@ -51,6 +51,7 @@ class SearchTest extends PHPUnit\Framework\TestCase {
public function provideIntitleSearch() {
return array(
array('intitle:word1', array('word1'), null),
+ array('intitle:word1-word2', array('word1-word2'), null),
array('intitle:word1 word2', array('word1'), array('word2')),
array('intitle:"word1 word2"', array('word1 word2'), null),
array("intitle:'word1 word2'", array('word1 word2'), null),
@@ -88,6 +89,7 @@ class SearchTest extends PHPUnit\Framework\TestCase {
public function provideAuthorSearch() {
return array(
array('author:word1', array('word1'), null),
+ array('author:word1-word2', array('word1-word2'), null),
array('author:word1 word2', array('word1'), array('word2')),
array('author:"word1 word2"', array('word1 word2'), null),
array("author:'word1 word2'", array('word1 word2'), null),