Files
hearth/package/gitea/source/services/packages/arch/repository_test.go
T
yukkop d9b2a4e787
runner nix smoke / nix label and flake smoke (push) Failing after 1m28s
feat: update gitea vendor
2026-09-26 21:18:24 +00:00

18 lines
415 B
Go

// Copyright 2026 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package arch
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestJoinFields(t *testing.T) {
values := []string{"usr/bin/a", "usr/bin/b\n\n%FILES%\netc/cron.d/x", "usr/bin/c"}
assert.Equal(t, "usr/bin/a\nusr/bin/c", joinFields(values))
assert.Len(t, values, 3) // must not modify the caller's slice
}