(file string)
| 66 | } |
| 67 | |
| 68 | func (t ParserTestCase) TestPrintFile(file string) { |
| 69 | content, err := ioutil.ReadFile(path.Join("./testData", file)) |
| 70 | if err != nil { |
| 71 | t.Errorf("file %s not found", file) |
| 72 | return |
| 73 | } |
| 74 | parts := bytes.Split(content, []byte("===")) |
| 75 | t.ExpectPrintName(file, string(bytes.TrimSpace(parts[0])), string(bytes.TrimSpace(parts[1]))) |
| 76 | } |
| 77 | |
| 78 | func (t ParserTestCase) ExpectPrintSame(input string) { |
| 79 | t.ExpectPrint(input, input) |
no test coverage detected