package main import "testing" func TestAppDisplayVersionUsesVersionAndBuild(t *testing.T) { origVersion := appVersion origBuild := appBuild t.Cleanup(func() { appVersion = origVersion appBuild = origBuild }) appVersion = "9.8.7" appBuild = "20260709.0200" if got, want := appDisplayVersion(), "9.8.7 (build 20260709.0200)"; got != want { t.Fatalf("appDisplayVersion() = %q, want %q", got, want) } }