(t *testing.T)
| 57 | } |
| 58 | |
| 59 | func TestProgWithDash(t *testing.T) { |
| 60 | rootCmd := &Command{Use: "root-dash", Args: NoArgs, Run: emptyRun} |
| 61 | buf := new(bytes.Buffer) |
| 62 | assertNoErr(t, rootCmd.GenFishCompletion(buf, false)) |
| 63 | output := buf.String() |
| 64 | |
| 65 | // Functions name should have replace the '-' |
| 66 | check(t, output, "__root_dash_perform_completion") |
| 67 | checkOmit(t, output, "__root-dash_perform_completion") |
| 68 | |
| 69 | // The command name should not have replaced the '-' |
| 70 | check(t, output, "-c root-dash") |
| 71 | checkOmit(t, output, "-c root_dash") |
| 72 | } |
| 73 | |
| 74 | func TestProgWithColon(t *testing.T) { |
| 75 | rootCmd := &Command{Use: "root:colon", Args: NoArgs, Run: emptyRun} |
nothing calls this directly
no test coverage detected