Enforce runtime report contracts and recoverable session exports
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package cli
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestOutputFormatFlag(t *testing.T) {
|
||||
for _, format := range []string{"html", "markdown"} {
|
||||
app := App{Out: &bytes.Buffer{}, Err: &bytes.Buffer{}}
|
||||
f, o := app.flags("run")
|
||||
if err := parse(f, []string{"--output-format", format}); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if o.outputFormat != format {
|
||||
t.Fatalf("%q", o.outputFormat)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user