22 lines
345 B
Go
22 lines
345 B
Go
|
package cli
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
func TestGetCliReturnsNonNil(t *testing.T) {
|
||
|
root := GetCli()
|
||
|
|
||
|
if root == nil {
|
||
|
t.Error("Expected to get command pointer, got nil.")
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func TestGetCliReturnsCliRoot(t *testing.T) {
|
||
|
root := GetCli()
|
||
|
|
||
|
if len(root.Commands()) == 0 {
|
||
|
t.Error("Expected to find >= 0 commands mapped, found none.")
|
||
|
}
|
||
|
}
|