1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-01 16:05:47 +08:00
Files
kubo/core/commands/helptext_test.go
Steven Allen 3eba14aa24 gx update
Updates:

* go-kad-dht: Query performance improvements, DHT client fixes, validates
  records on *local* put.
* go-libp2p-swarm/go-libp2p-transport: Timeout improvements.
* go-multiaddr-net: Exposes useful Conn methods (CloseWrite, CloseRead, etc.)
* go-log: fixes possible panic when enabling/disabling events.
* go-multiaddr: fixes possible panic when stringifying malformed multiaddrs,
  adds support for consuming /p2p/ multiaddrs.

fixes #5113
unblocks #4895

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-06-26 17:11:33 -07:00

37 lines
855 B
Go

package commands
import (
"strings"
"testing"
cmds "gx/ipfs/QmNueRyPRQiV7PUEpnP4GgGLuK1rKQLaRW7sfPvUetYig1/go-ipfs-cmds"
)
func checkHelptextRecursive(t *testing.T, name []string, c *cmds.Command) {
if c.Helptext.Tagline == "" {
t.Errorf("%s has no tagline!", strings.Join(name, " "))
}
if c.Helptext.LongDescription == "" {
t.Errorf("%s has no long description!", strings.Join(name, " "))
}
if c.Helptext.ShortDescription == "" {
t.Errorf("%s has no short description!", strings.Join(name, " "))
}
if c.Helptext.Synopsis == "" {
t.Errorf("%s has no synopsis!", strings.Join(name, " "))
}
for subname, sub := range c.Subcommands {
checkHelptextRecursive(t, append(name, subname), sub)
}
}
func TestHelptexts(t *testing.T) {
t.Skip("sill isn't 100%")
Root.ProcessHelp()
checkHelptextRecursive(t, []string{"ipfs"}, Root)
}