(t *testing.T, env *execenv.Env)
| 42 | } |
| 43 | |
| 44 | func parseComments(t *testing.T, env *execenv.Env) []parsedComment { |
| 45 | t.Helper() |
| 46 | |
| 47 | parser := &commentParser{ |
| 48 | t: t, |
| 49 | comments: []parsedComment{}, |
| 50 | } |
| 51 | |
| 52 | comment := &parsedComment{} |
| 53 | parser.fn = parser.parseAuthor |
| 54 | |
| 55 | for _, line := range strings.Split(env.Out.String(), "\n") { |
| 56 | parser.fn(comment, line) |
| 57 | } |
| 58 | |
| 59 | parser.comments = append(parser.comments, *comment) |
| 60 | |
| 61 | return parser.comments |
| 62 | } |
| 63 | |
| 64 | func (p *commentParser) parseAuthor(comment *parsedComment, line string) { |
| 65 | p.t.Helper() |
no test coverage detected