Rename profile/icons to profile/binmeta

This commit is contained in:
Daniel
2023-12-19 15:33:45 +01:00
parent a88de1532c
commit 2ae24656fc
23 changed files with 49 additions and 49 deletions

View File

@@ -0,0 +1,32 @@
package binmeta
import (
"os"
"testing"
)
func TestFindIcon(t *testing.T) {
if testing.Short() {
t.Skip("test depends on linux desktop environment")
}
t.Parallel()
home := os.Getenv("HOME")
testFindIcon(t, "evolution", home)
testFindIcon(t, "nextcloud", home)
}
func testFindIcon(t *testing.T, binName string, homeDir string) {
t.Helper()
iconPath, err := searchForIcon(binName, homeDir)
if err != nil {
t.Error(err)
return
}
if iconPath == "" {
t.Errorf("no icon found for %s", binName)
return
}
t.Logf("icon for %s found: %s", binName, iconPath)
}