You must login to view /gokrazy/tools/commit/b0f51bdf9220eeb200678d8017f29faa9bdc353f.
The GitHub option should be usable for most people, it only links via username.

Files
tools/internal/packer/packer_test.go
2024-08-18 16:15:51 +02:00

22 lines
380 B
Go

package packer
import (
"os"
"testing"
)
func TestKernelGoarch(t *testing.T) {
for _, arch := range []string{"386", "arm", "arm64", "amd64"} {
t.Run(arch, func(t *testing.T) {
k, err := os.ReadFile("testdata/kernel." + arch)
if err != nil {
t.Fatal(err)
}
got := kernelGoarch(k)
if got != arch {
t.Errorf("got %q; want %q", got, arch)
}
})
}
}