(t *testing.T)
| 73 | } |
| 74 | |
| 75 | func TestGenYamlDocRunnable(t *testing.T) { |
| 76 | // Testing a runnable command: should contain the "usage" field |
| 77 | buf := new(bytes.Buffer) |
| 78 | if err := GenYaml(rootCmd, buf); err != nil { |
| 79 | t.Fatal(err) |
| 80 | } |
| 81 | output := buf.String() |
| 82 | |
| 83 | checkStringContains(t, output, "usage: "+rootCmd.Use) |
| 84 | } |
| 85 | |
| 86 | func BenchmarkGenYamlToFile(b *testing.B) { |
| 87 | file, err := os.CreateTemp("", "") |
nothing calls this directly
no test coverage detected