devicepath/file_test.go

19 lines
442 B
Go
Raw Permalink Normal View History

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