PPSortedLines sorts the lines of the output of the task. This is useful when the order of the output is not important, but the output is expected to be the same each time the task is run (e.g. when running tasks in parallel).
(t *testing.T, b []byte)
| 303 | // the order of the output is not important, but the output is expected to be |
| 304 | // the same each time the task is run (e.g. when running tasks in parallel). |
| 305 | func PPSortedLines(t *testing.T, b []byte) []byte { |
| 306 | t.Helper() |
| 307 | lines := strings.Split(strings.TrimSpace(string(b)), "\n") |
| 308 | sort.Strings(lines) |
| 309 | return []byte(strings.Join(lines, "\n") + "\n") |
| 310 | } |
| 311 | |
| 312 | // normalizeOutput normalizes cross-platform differences for byte slice comparison: |
| 313 | // - Converts CRLF and CR to LF (line endings) |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…