aboutsummaryrefslogtreecommitdiffstats
path: root/internal/notify/classify_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/notify/classify_test.go')
-rw-r--r--internal/notify/classify_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/notify/classify_test.go b/internal/notify/classify_test.go
index 6234008..bbe7989 100644
--- a/internal/notify/classify_test.go
+++ b/internal/notify/classify_test.go
@@ -39,8 +39,12 @@ func TestIsIconImage(t *testing.T) {
small := filepath.Join(dir, "logo.png")
large := filepath.Join(dir, "shot.png")
svg := filepath.Join(dir, "icon.svg")
+ exactly := filepath.Join(dir, "256.png")
+ over := filepath.Join(dir, "over.png")
writeTestPNG(t, small, 32, 32)
writeTestPNG(t, large, 800, 600)
+ writeTestPNG(t, exactly, 256, 256)
+ writeTestPNG(t, over, 256, 257)
if err := os.WriteFile(svg, []byte("<svg/>"), 0o644); err != nil {
t.Fatal(err)
}
@@ -52,6 +56,8 @@ func TestIsIconImage(t *testing.T) {
{"theme name", "utilities-terminal", "/x/apps/16/utilities-terminal.svg", true},
{"svg", svg, svg, true},
{"small raster", small, small, true},
+ {"at the bound", exactly, exactly, true},
+ {"just over the bound", over, over, false},
{"large raster", large, large, false},
{"missing file", "/no/such.png", "/no/such.png", false},
{"empty", "", "", false},