Initial commit, source code of Gitea 1.23.1
This commit is contained in:
16
modules/indexer/code/elasticsearch/elasticsearch_test.go
Normal file
16
modules/indexer/code/elasticsearch/elasticsearch_test.go
Normal file
@@ -0,0 +1,16 @@
|
||||
// Copyright 2020 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package elasticsearch
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestIndexPos(t *testing.T) {
|
||||
startIdx, endIdx := contentMatchIndexPos("test index start and end", "start", "end")
|
||||
assert.EqualValues(t, 11, startIdx)
|
||||
assert.EqualValues(t, 15, endIdx)
|
||||
}
|
Reference in New Issue
Block a user