Files

14 lines
439 B
Go

package plugin
import "testing"
func TestPlatformOverrideEnv(t *testing.T) {
t.Setenv("REIMS_GO_PLATFORM", "windows-x64")
if !matchesCurrentPlatform([]string{"windows-x64"}) || !matchesCurrentPlatform([]string{"windows/amd64"}) {
t.Fatal("expected windows-x64 override to match windows-x64 and windows/amd64")
}
if matchesCurrentPlatform([]string{"linux-x64"}) {
t.Fatal("expected windows-x64 override to reject linux-x64")
}
}