devicepath/harddrive_test.go

18 lines
452 B
Go

package devicepath_test
import (
"testing"
"git.faercol.me/faercol/devicepath"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestHDParseString(t *testing.T) {
t.Run("GPT", func(t *testing.T) {
expected := "HD(1,GPT,16f06d01-50da-6544-86bd-f3457f980086,0x1000,0x96000)"
var dev devicepath.HardDriveDevicePath
require.NoError(t, dev.ParseString(expected))
assert.Equal(t, expected, dev.String())
})
}