forgejo_a_10.0.1/modules/indexer/code/elasticsearch/elasticsearch_test.go
David Rotermund 3ce683f79b
Some checks failed
Integration tests for the release process / release-simulation (push) Has been cancelled
Init
2025-02-23 03:12:21 +01:00

16 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 := indexPos("test index start and end", "start", "end")
assert.EqualValues(t, 11, startIdx)
assert.EqualValues(t, 24, endIdx)
}