Codebase list golang-github-vbauerster-mpb / 2bf51b1
fix writer_posix_test Vladimir Bauer 7 years ago
1 changed file(s) with 4 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
2222 {input: "fizz\n", expectedOutput: "foo\n" + ClearCursorAndLine + "bar\n" + ClearCursorAndLine + "fizz\n"},
2323 } {
2424 t.Run(tcase.input, func(t *testing.T) {
25 w.Write([]byte(tcase.input))
26 w.Flush()
25 s := []byte(tcase.input)
26 lc := bytes.Count(s, []byte("\n"))
27 w.Write(s)
28 w.Flush(lc)
2729 output := out.String()
2830 if output != tcase.expectedOutput {
2931 t.Fatalf("want %q, got %q", tcase.expectedOutput, output)