MCPcopy Create free account
hub / github.com/docker/docker-agent / TestAutocompleteRenderWidth

Function TestAutocompleteRenderWidth

pkg/leantui/autocomplete_test.go:50–60  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

48}
49
50func TestAutocompleteRenderWidth(t *testing.T) {
51 t.Parallel()
52 a := newAutocomplete()
53 a.setCommands(testCommands())
54 require.True(t, a.sync("/"))
55 rows := a.render(60)
56 assert.NotEmpty(t, rows)
57 for _, r := range rows {
58 assert.LessOrEqual(t, displayWidth(r), 60)
59 }
60}
61
62func TestAutocompleteBuiltinsBeforeAgent(t *testing.T) {
63 t.Parallel()

Callers

nothing calls this directly

Calls 6

newAutocompleteFunction · 0.85
testCommandsFunction · 0.85
displayWidthFunction · 0.85
setCommandsMethod · 0.80
syncMethod · 0.80
renderMethod · 0.45

Tested by

no test coverage detected