TestTokenTooLong tests for really long tokens. https://github.com/matryer/xbar/issues/629
(t *testing.T)
| 135 | // TestTokenTooLong tests for really long tokens. |
| 136 | // https://github.com/matryer/xbar/issues/629 |
| 137 | func TestTokenTooLong(t *testing.T) { |
| 138 | is := is.New(t) |
| 139 | |
| 140 | f, err := os.Open(filepath.Join("testdata", "token-too-long", "jma.1h.sh.output")) |
| 141 | is.NoErr(err) // os.Open |
| 142 | t.Cleanup(func() { |
| 143 | err := f.Close() |
| 144 | is.NoErr(err) // f.Close |
| 145 | }) |
| 146 | |
| 147 | p := Plugin{} |
| 148 | ctx := context.Background() |
| 149 | items, err := p.parseOutput(ctx, "jma.1h.sh", f) |
| 150 | is.NoErr(err) |
| 151 | is.Equal(len(items.CycleItems), 1) |
| 152 | } |
| 153 | |
| 154 | // TestNestedSeparators ensures separators work inside submenus. |
| 155 | // https://github.com/matryer/xbar/issues/648 |
nothing calls this directly
no test coverage detected