1
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-05-15 12:10:19 +00:00
2025-03-31 01:53:48 -04:00

17 lines
358 B
Go

// 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.Equal(t, 11, startIdx)
assert.Equal(t, 15, endIdx)
}