(t *testing.T)
| 23 | ) |
| 24 | |
| 25 | func TestParseData(t *testing.T) { |
| 26 | if runtime.GOOS == "nacl" { |
| 27 | t.Skip("no direct filesystem access on Nacl") |
| 28 | } |
| 29 | |
| 30 | const path = "testdata/" |
| 31 | files, err := os.ReadDir(path) |
| 32 | if err != nil { |
| 33 | t.Errorf("Problem reading directory %s : %v", path, err) |
| 34 | } |
| 35 | for _, f := range files { |
| 36 | file := path + f.Name() |
| 37 | inbytes, err := os.ReadFile(file) |
| 38 | if err != nil { |
| 39 | t.Errorf("Problem reading file: %s : %v", file, err) |
| 40 | continue |
| 41 | } |
| 42 | profile.ParseData(inbytes) |
| 43 | } |
| 44 | } |