package main import ( "os" "strings" "testing" ) // R-1261 — a hold of an app removed while held is dropped only if main gives the watch the installed check; without // it TorrentInstalled is nil, which means „assume installed", and the record waits for an app that never runs again. func TestR1261_MainWiresTheInstalledCheck(t *testing.T) { b, err := os.ReadFile("upwatch_wiring.go") if err != nil { t.Fatal(err) } if !strings.Contains(string(b), "TorrentInstalled: func(stack string) bool") { t.Fatal("upwatch_wiring.go must wire TorrentInstalled (R-1261)") } }