mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-04-26 09:46:04 +02:00

Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org> Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
16 lines
346 B
Go
16 lines
346 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.Equal(t, 11, startIdx)
|
|
assert.Equal(t, 24, endIdx)
|
|
}
|