MCPcopy Create free account
hub / github.com/docker/cli / TestDecoratedName

Function TestDecoratedName

cli/cobra_test.go:103–110  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

101}
102
103func TestDecoratedName(t *testing.T) {
104 root := &cobra.Command{Use: "root"}
105 topLevelCommand := &cobra.Command{Use: "pluginTopLevelCommand"}
106 root.AddCommand(topLevelCommand)
107 assert.Equal(t, decoratedName(topLevelCommand), "pluginTopLevelCommand ")
108 topLevelCommand.Annotations = map[string]string{metadata.CommandAnnotationPlugin: "true"}
109 assert.Equal(t, decoratedName(topLevelCommand), "pluginTopLevelCommand*")
110}

Callers

nothing calls this directly

Calls 1

decoratedNameFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…