github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/gnovm/cmd/gno/doc_test.go (about) 1 package main 2 3 import "testing" 4 5 func TestGnoDoc(t *testing.T) { 6 tc := []testMainCase{ 7 { 8 args: []string{"doc", "io.Writer"}, 9 stdoutShouldContain: "Writer is the interface that wraps", 10 }, 11 { 12 args: []string{"doc", "avl"}, 13 stdoutShouldContain: "func NewTree", 14 }, 15 { 16 args: []string{"doc", "-u", "avl.Node"}, 17 stdoutShouldContain: "node *Node", 18 }, 19 { 20 args: []string{"doc", "dkfdkfkdfjkdfj"}, 21 errShouldContain: "package not found", 22 }, 23 { 24 args: []string{"doc", "There.Are.Too.Many.Dots"}, 25 errShouldContain: "invalid arguments", 26 }, 27 } 28 testMainCaseRun(t, tc) 29 }