(t *testing.T)
| 82 | } |
| 83 | |
| 84 | func TestConfigs(t *testing.T) { |
| 85 | dir, err := os.Open("testdata") |
| 86 | if err != nil { |
| 87 | t.Fatal(err) |
| 88 | } |
| 89 | names, err := dir.Readdirnames(-1) |
| 90 | if err != nil { |
| 91 | t.Fatal(err) |
| 92 | } |
| 93 | for _, name := range names { |
| 94 | if strings.HasPrefix(name, ".#") { |
| 95 | // Emacs noise. |
| 96 | continue |
| 97 | } |
| 98 | if *flagOnly != "" && !strings.Contains(name, *flagOnly) { |
| 99 | continue |
| 100 | } |
| 101 | if strings.HasSuffix(name, ".json") { |
| 102 | if strings.HasSuffix(name, "-want.json") { |
| 103 | continue |
| 104 | } |
| 105 | testConfig(filepath.Join("testdata", name), t) |
| 106 | } |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | type namedReadSeeker struct { |
| 111 | name string |
nothing calls this directly
no test coverage detected