Add support for multiple output files in different formats (#732)

This commit is contained in:
Keith Zantow
2022-01-06 17:52:20 -05:00
committed by GitHub
parent 38c4b17847
commit 5e5312c72d
51 changed files with 642 additions and 243 deletions
+10
View File
@@ -2,6 +2,7 @@ package cli
import (
"encoding/json"
"os"
"regexp"
"strings"
"testing"
@@ -114,3 +115,12 @@ func assertSuccessfulReturnCode(tb testing.TB, _, _ string, rc int) {
tb.Errorf("expected no failure but got rc=%d", rc)
}
}
func assertFileExists(file string) traitAssertion {
return func(tb testing.TB, _, _ string, _ int) {
tb.Helper()
if _, err := os.Stat(file); err != nil {
tb.Errorf("expected file to exist %s", file)
}
}
}