dumpFileContent dumps file content into t.Log.
(t *testing.T, filePath string)
| 1044 | |
| 1045 | // dumpFileContent dumps file content into t.Log. |
| 1046 | func dumpFileContent(t *testing.T, filePath string) { |
| 1047 | f, err := os.Open(filePath) |
| 1048 | require.NoError(t, err) |
| 1049 | defer f.Close() |
| 1050 | |
| 1051 | r := bufio.NewReader(f) |
| 1052 | for { |
| 1053 | line, err := r.ReadString('\n') |
| 1054 | switch err { |
| 1055 | case nil: |
| 1056 | t.Log(strings.TrimSuffix(line, "\n")) |
| 1057 | case io.EOF: |
| 1058 | return |
| 1059 | default: |
| 1060 | require.NoError(t, err) |
| 1061 | } |
| 1062 | } |
| 1063 | } |
no test coverage detected
searching dependent graphs…