(t *testing.T)
| 2062 | } |
| 2063 | |
| 2064 | func TestCommandHelpSuggest(t *testing.T) { |
| 2065 | cmd := &Command{ |
| 2066 | Suggest: true, |
| 2067 | Commands: []*Command{ |
| 2068 | { |
| 2069 | Name: "putz", |
| 2070 | }, |
| 2071 | }, |
| 2072 | } |
| 2073 | |
| 2074 | cmd.setupDefaults([]string{"foo"}) |
| 2075 | |
| 2076 | err := ShowCommandHelp(context.Background(), cmd, "put") |
| 2077 | assert.ErrorContains(t, err, "No help topic for 'put'. putz") |
| 2078 | } |
| 2079 | |
| 2080 | func TestWrapLine(t *testing.T) { |
| 2081 | assert.Equal(t, " ", wrapLine(" ", 0, 3, " ")) |
nothing calls this directly
no test coverage detected