github.com/joselitofilho/goreleaser@v0.155.1-0.20210123221854-e4891856c593/internal/linux/arch_test.go (about)

     1  package linux
     2  
     3  import (
     4  	"fmt"
     5  	"testing"
     6  
     7  	"github.com/stretchr/testify/require"
     8  )
     9  
    10  func TestArch(t *testing.T) {
    11  	for from, to := range map[string]string{
    12  		"linuxamd64":   "amd64",
    13  		"linux386":     "i386",
    14  		"linuxarm64":   "arm64",
    15  		"linuxarm5":    "armel",
    16  		"linuxarm6":    "armhf",
    17  		"linuxarm7":    "armhf",
    18  		"linuxppc64":   "ppc64",
    19  		"linuxppc64le": "ppc64le",
    20  		"linuxwhat":    "what",
    21  	} {
    22  		t.Run(fmt.Sprintf("%s to %s", from, to), func(t *testing.T) {
    23  			require.Equal(t, to, Arch(from))
    24  		})
    25  	}
    26  }