embed_test.go 672 B

123456789101112131415161718192021222324
  1. // Copyright 2022 The Gogs Authors. All rights reserved.
  2. // Use of this source code is governed by a MIT-style
  3. // license that can be found in the LICENSE and LICENSE.gogs file.
  4. // Copyright 2025 Huan-Gogs Authors. All rights reserved.
  5. // Use of this source code is governed by a MIT-style
  6. // license that can be found in the LICENSE file.
  7. package conf
  8. import (
  9. "testing"
  10. "github.com/stretchr/testify/assert"
  11. "github.com/stretchr/testify/require"
  12. )
  13. func TestFileNames(t *testing.T) {
  14. names, err := FileNames(".")
  15. require.NoError(t, err)
  16. want := []string{"app.ini", "auth.d", "gitignore", "label", "license", "locale", "readme"}
  17. assert.Equal(t, want, names)
  18. }