mirror of https://github.com/go-gitea/gitea.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
589 B
Go
25 lines
589 B
Go
// Copyright 2025 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package fileicon_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"code.gitea.io/gitea/models/unittest"
|
|
"code.gitea.io/gitea/modules/fileicon"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestMain(m *testing.M) {
|
|
unittest.MainTest(m, &unittest.TestOptions{FixtureFiles: []string{}})
|
|
}
|
|
|
|
func TestFindIconName(t *testing.T) {
|
|
unittest.PrepareTestEnv(t)
|
|
p := fileicon.DefaultMaterialIconProvider()
|
|
assert.Equal(t, "php", p.FindIconName("foo.php", false))
|
|
assert.Equal(t, "php", p.FindIconName("foo.PHP", false))
|
|
}
|