github.com/scaleway/scaleway-cli@v1.11.1/pkg/cli/command_test.go (about)

     1  package cli
     2  
     3  import (
     4  	"testing"
     5  
     6  	. "github.com/smartystreets/goconvey/convey"
     7  )
     8  
     9  func TestCommand_Name(t *testing.T) {
    10  	Convey("Testing Command.Name()", t, func() {
    11  		command := Command{
    12  			UsageLine: "top [OPTIONS] SERVER",
    13  		}
    14  		So(command.Name(), ShouldEqual, "top")
    15  
    16  		command = Command{
    17  			UsageLine: "top",
    18  		}
    19  		So(command.Name(), ShouldEqual, "top")
    20  	})
    21  }