devicepath/harddrive_test.go

19 lines
452 B
Go
Raw Permalink Normal View History

2023-09-16 15:00:46 +00:00
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())
})
}