This commit is contained in:
2026-05-13 20:40:14 +08:00
parent bd13c842a8
commit c8a75ef2d5
17 changed files with 920 additions and 93 deletions

23
app_options_test.go Normal file
View File

@@ -0,0 +1,23 @@
package main
import "testing"
func TestNewAppOptionsHidesWindowOnClose(t *testing.T) {
app := &App{}
options := newAppOptions(app, assets)
if !options.HideWindowOnClose {
t.Fatal("expected closing the window to hide it instead of quitting")
}
}
func TestNewAppOptionsStopsTrayOnShutdown(t *testing.T) {
app := &App{}
options := newAppOptions(app, assets)
if options.OnShutdown == nil {
t.Fatal("expected shutdown hook to clean up the tray icon")
}
}