gitee.com/mirrors_opencollective/goreleaser@v0.45.0/internal/linux/arch_test.go (about)

     1  package linux
     2  
     3  import (
     4  	"fmt"
     5  	"testing"
     6  
     7  	"github.com/stretchr/testify/assert"
     8  )
     9  
    10  func TestArch(t *testing.T) {
    11  	for from, to := range map[string]string{
    12  		"amd64": "amd64",
    13  		"386":   "i386",
    14  		"arm64": "arm64",
    15  		"arm6":  "armhf",
    16  		"what":  "what",
    17  	} {
    18  		t.Run(fmt.Sprintf("%s to %s", from, to), func(t *testing.T) {
    19  			assert.Equal(t, to, Arch(from))
    20  		})
    21  	}
    22  }