17 lines
380 B
Go
17 lines
380 B
Go
package cli
|
|
|
|
import "testing"
|
|
|
|
func TestNormalizeVerb(t *testing.T) {
|
|
cases := map[string]string{
|
|
"rm": "remove", "del": "remove", "remove": "remove",
|
|
"ls": "list", "list": "list",
|
|
"add": "add", "enable": "enable", "": "",
|
|
}
|
|
for in, want := range cases {
|
|
if got := normalizeVerb(in); got != want {
|
|
t.Errorf("normalizeVerb(%q) = %q, want %q", in, got, want)
|
|
}
|
|
}
|
|
}
|