(t *testing.T)
| 10 | ) |
| 11 | |
| 12 | func TestSetTipsAndGetTips(t *testing.T) { |
| 13 | cmd := &cobra.Command{Use: "test"} |
| 14 | tips := []string{"tip one", "tip two"} |
| 15 | SetTips(cmd, tips) |
| 16 | |
| 17 | got := GetTips(cmd) |
| 18 | if len(got) != 2 || got[0] != "tip one" || got[1] != "tip two" { |
| 19 | t.Fatalf("expected %v, got %v", tips, got) |
| 20 | } |
| 21 | } |
| 22 | |
| 23 | func TestSetTipsEmpty(t *testing.T) { |
| 24 | cmd := &cobra.Command{Use: "test"} |