mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-09-07 09:42:12 +00:00
Backport https://github.com/go-gitea/gitea/pull/29740 (based on #29671 ...) (cherry picked from commit 0cbbcf20e3f83413a88fe3d436451d707639fe55)
This commit is contained in:
parent
655302fc96
commit
a876ac2c79
2 changed files with 29 additions and 1 deletions
|
@ -11,6 +11,8 @@ import (
|
|||
"time"
|
||||
|
||||
"code.gitea.io/gitea/modules/indexer/issues/internal/tests"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestMeilisearchIndexer(t *testing.T) {
|
||||
|
@ -49,3 +51,11 @@ func TestMeilisearchIndexer(t *testing.T) {
|
|||
|
||||
tests.TestIndexer(t, indexer)
|
||||
}
|
||||
|
||||
func TestDoubleQuoteKeyword(t *testing.T) {
|
||||
assert.EqualValues(t, "", doubleQuoteKeyword(""))
|
||||
assert.EqualValues(t, `"a" "b" "c"`, doubleQuoteKeyword("a b c"))
|
||||
assert.EqualValues(t, `"a" "d" "g"`, doubleQuoteKeyword("a d g"))
|
||||
assert.EqualValues(t, `"a" "d" "g"`, doubleQuoteKeyword("a d g"))
|
||||
assert.EqualValues(t, `"a" "d" "g"`, doubleQuoteKeyword(`a "" "d" """g`))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue