(t *testing.T)
| 106 | } |
| 107 | |
| 108 | func TestParseMultiplePipes(t *testing.T) { |
| 109 | is := is.New(t) |
| 110 | |
| 111 | const text = `cloudflare | bash=/tmp/bitbar_dns_switcher_cloudflare | terminal=false | refresh=true |
| 112 | google | bash=/tmp/bitbar_dns_switcher_google | terminal=true | refresh=false |
| 113 | ` |
| 114 | p := &Plugin{} |
| 115 | items, err := p.parseOutput(context.Background(), "optional-pipes.txt", strings.NewReader(text)) |
| 116 | is.NoErr(err) |
| 117 | is.Equal(items.CycleItems[0].Text, "cloudflare") |
| 118 | is.Equal(items.CycleItems[0].Params.Terminal, false) |
| 119 | is.Equal(items.CycleItems[0].Params.Refresh, true) |
| 120 | is.Equal(items.CycleItems[1].Text, "google") |
| 121 | is.Equal(items.CycleItems[1].Params.Terminal, true) |
| 122 | is.Equal(items.CycleItems[1].Params.Refresh, false) |
| 123 | } |
| 124 | |
| 125 | func TestStartWithPipe(t *testing.T) { |
| 126 | is := is.New(t) |
nothing calls this directly
no test coverage detected