MCPcopy
hub / github.com/sqlc-dev/sqlc / parseStderr

Function parseStderr

internal/endtoend/case_test.go:34–51  ·  view source on GitHub ↗
(t *testing.T, dir, testctx string)

Source from the content-addressed store, hash-verified

32}
33
34func parseStderr(t *testing.T, dir, testctx string) []byte {
35 t.Helper()
36 paths := []string{
37 filepath.Join(dir, "stderr", fmt.Sprintf("%s.txt", testctx)),
38 filepath.Join(dir, fmt.Sprintf("stderr_%s.txt", runtime.GOOS)),
39 filepath.Join(dir, "stderr.txt"),
40 }
41 for _, path := range paths {
42 if _, err := os.Stat(path); !os.IsNotExist(err) {
43 blob, err := os.ReadFile(path)
44 if err != nil {
45 t.Fatal(err)
46 }
47 return blob
48 }
49 }
50 return nil
51}
52
53func parseExec(t *testing.T, dir string) *Exec {
54 t.Helper()

Callers 1

FindTestsFunction · 0.85

Calls 1

JoinMethod · 0.45

Tested by

no test coverage detected