devicepath/file_test.go

18 lines
442 B
Go

package devicepath_test
import (
"testing"
"git.faercol.me/faercol/devicepath"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestParseFileString(t *testing.T) {
t.Run("ok", func(t *testing.T) {
var fileDev devicepath.FileDevicePath
expected := `File(\\EFI\\HTTPBOOT\\HTTP_BOOT_CLIENT.EFI)`
require.NoError(t, fileDev.ParseString(expected))
assert.Equal(t, expected, fileDev.String())
})
}