(t *testing.T)
| 174 | } |
| 175 | |
| 176 | func TestTrim(t *testing.T) { |
| 177 | is := is.New(t) |
| 178 | |
| 179 | ctx := context.Background() |
| 180 | p := &Plugin{} |
| 181 | items, err := p.parseOutput(ctx, "test.txt", strings.NewReader(strings.TrimSpace(` |
| 182 | |
| 183 | cycle1 | trim=true |
| 184 | cycle2 | trim=false |
| 185 | cycle3 |
| 186 | `))) |
| 187 | is.NoErr(err) |
| 188 | is.Equal(len(items.CycleItems), 3) // CycleItems |
| 189 | is.Equal(items.CycleItems[0].Text, `cycle1`) |
| 190 | is.Equal(items.CycleItems[1].Text, ` cycle2 `) |
| 191 | is.Equal(items.CycleItems[2].Text, `cycle3`) |
| 192 | } |
| 193 | |
| 194 | func TestSeparator(t *testing.T) { |
| 195 | is := is.New(t) |
nothing calls this directly
no test coverage detected