(t *testing.T)
| 512 | } |
| 513 | |
| 514 | func TestGetCommandWithNoArgsWithDeps_HelpVisibility(t *testing.T) { |
| 515 | t.Parallel() |
| 516 | |
| 517 | wsl := wsllib.MockWslLib{ |
| 518 | IsDistributionRegisteredFunc: func(name string) bool { |
| 519 | return false |
| 520 | }, |
| 521 | } |
| 522 | cmd := GetCommandWithNoArgsWithDeps(wsl, wsllib.MockWslReg{}) |
| 523 | if cmd.Visible == nil { |
| 524 | t.Fatal("Visible is nil") |
| 525 | } |
| 526 | if !cmd.Visible("Arch") { |
| 527 | t.Fatal("Visible(Arch) = false, want true") |
| 528 | } |
| 529 | if cmd.HelpText == nil { |
| 530 | t.Fatal("HelpText is nil") |
| 531 | } |
| 532 | if got := cmd.HelpText(); got == "" { |
| 533 | t.Fatal("HelpText should not be empty") |
| 534 | } |
| 535 | |
| 536 | err := cmd.Run("Arch", []string{"a", "b"}) |
| 537 | assertDisplayError(t, err) |
| 538 | } |
| 539 | |
| 540 | func TestGetCommandWithDeps_HelpVisibility(t *testing.T) { |
| 541 | t.Parallel() |
nothing calls this directly
no test coverage detected