mirror of
https://github.com/db9979/sshtermy.git
synced 2026-12-06 04:34:08 +01:00
- release.yml baut .deb (amd64, arm64) und schreibt Formula/sshtermy.rb - pages.yml: Webseite (site/, en + de, GIFs) und apt-Quelle unter /apt - winget.yml: Einreichung bei winget-pkgs von Hand (Secret WINGET_TOKEN) - Bei Homebrew/apt-Installation kein Selbst-Update, stattdessen Befehl - tools/dev/gifs: Aufnahme der GIFs aus der echten App Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUfgD3KuJTKRbUm5tK6
27 lines
1.0 KiB
Go
27 lines
1.0 KiB
Go
package update
|
|
|
|
import "testing"
|
|
|
|
func TestManagedBy(t *testing.T) {
|
|
yes := func(string) bool { return true }
|
|
no := func(string) bool { return false }
|
|
cases := []struct {
|
|
exe, goos string
|
|
exists func(string) bool
|
|
want string
|
|
}{
|
|
{"/opt/homebrew/Cellar/sshtermy/1.0.40/bin/sshtermy", "darwin", no, "brew upgrade sshtermy"},
|
|
{"/usr/local/Cellar/sshtermy/1.0.40/bin/sshtermy", "darwin", no, "brew upgrade sshtermy"},
|
|
{"/home/linuxbrew/.linuxbrew/Cellar/sshtermy/1.0.40/bin/sshtermy", "linux", no, "brew upgrade sshtermy"},
|
|
{"/usr/bin/sshtermy", "linux", yes, "sudo apt update && sudo apt install --only-upgrade sshtermy"},
|
|
{"/usr/bin/sshtermy", "linux", no, ""},
|
|
{"/Users/d/Applications/sshTermy.app/Contents/Resources/sshtermy", "darwin", yes, ""},
|
|
{`C:\Users\d\AppData\Local\Microsoft\WinGet\Packages\db9979.sshTermy_x\sshtermy.exe`, "windows", yes, ""},
|
|
}
|
|
for _, c := range cases {
|
|
if got := managedBy(c.exe, c.goos, c.exists); got != c.want {
|
|
t.Errorf("%s: %q, want %q", c.exe, got, c.want)
|
|
}
|
|
}
|
|
}
|