File: device_test.go

package info (click to toggle)
golang-github-foxboron-go-uefi 0.0~git20250207.69fb7db-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 9,140 kB
  • sloc: makefile: 29; sh: 14
file content (28 lines) | stat: -rw-r--r-- 487 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package device

import (
	"log"
	"os"
	"path/filepath"
	"testing"

	"github.com/foxboron/go-uefi/efi/attributes"
)

func TestAbs(t *testing.T) {
	dir := "../../tests/data/boot"
	attributes.Efivars = dir
	files, err := os.ReadDir(dir)
	if err != nil {
		log.Fatal(err)
	}
	for _, file := range files {
		filepath := filepath.Join(dir, file.Name())
		_, f, err := attributes.ReadEfivarsFile(filepath)
		if err != nil {
			t.Fatal(err)
		}
		ParseEFILoadOption(f)
		ParseDevicePath(f)
	}
}