Check whether the output of a test equals the expected output.
(t *testing.T, filename string, actual []byte)
| 882 | |
| 883 | // Check whether the output of a test equals the expected output. |
| 884 | func checkOutput(t *testing.T, filename string, actual []byte) { |
| 885 | t.Helper() |
| 886 | expectedOutput, err := os.ReadFile(filename) |
| 887 | if err != nil { |
| 888 | t.Fatal("could not read output file:", err) |
| 889 | } |
| 890 | checkOutputData(t, expectedOutput, actual) |
| 891 | } |
| 892 | |
| 893 | func checkOutputData(t *testing.T, expectedOutput, actual []byte) { |
| 894 | t.Helper() |
no test coverage detected