diff options
| author | 2022-03-21 12:51:03 +0100 | |
|---|---|---|
| committer | 2022-03-21 12:51:03 +0100 | |
| commit | 4d153eeaf85905e8402cc8d175f202967d909020 (patch) | |
| tree | 194ea90f602899d25be4243f188e10c3b13d6fda /tests/app | |
| parent | a89fce27cbc3f3cdfe0cbc10f1ba63a85efa8ebb (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/app')
| -rw-r--r-- | tests/app/Models/SearchTest.php | 2 |
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), |
