MCPcopy
hub / github.com/matryer/xbar / TestSeparator

Function TestSeparator

pkg/plugins/item_params_test.go:194–215  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

192}
193
194func TestSeparator(t *testing.T) {
195 is := is.New(t)
196
197 ctx := context.Background()
198 p := &Plugin{}
199 items, err := p.parseOutput(ctx, "test.txt", strings.NewReader(strings.TrimSpace(`
200cycle1 | trim=true
201cycle2 | trim=false
202cycle
203---
204one
205---
206two
207---
208three`)))
209 is.NoErr(err)
210 is.Equal(len(items.CycleItems), 3) // CycleItems
211 is.Equal(len(items.ExpandedItems), 5) // ExtendedItems
212 is.Equal(items.ExpandedItems[1].Params.Separator, true)
213 is.Equal(items.ExpandedItems[3].Params.Separator, true)
214
215}
216
217func TestBlankLines(t *testing.T) {
218 is := is.New(t)

Callers

nothing calls this directly

Calls 1

parseOutputMethod · 0.95

Tested by

no test coverage detected