package checks import "testing" // A Linux runner says honestly that it cannot check Apple code. func TestNeedsMacOS(t *testing.T) { for _, tc := range []struct { changed []string gate string want bool }{ {[]string{"ios/Woodstar/AccountNavigationHost.swift"}, "./scripts/ci.sh", true}, {[]string{"ios/Woodstar.xcodeproj/project.pbxproj"}, "", true}, {[]string{"internal/x.go", "web/a.js"}, "go test ./...", false}, {[]string{"README.md"}, "xcodebuild test -scheme App", true}, {nil, "make ci", false}, } { if got := NeedsMacOS(tc.changed, tc.gate); got != tc.want { t.Fatalf("NeedsMacOS(%v, %q) = %v", tc.changed, tc.gate, got) } } }