Skip to content

Commit

Permalink
fix: broken line breaks (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
wahapo authored Mar 22, 2021
1 parent 72de394 commit 949bb6d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion buildlog/buildlog.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func (l *log) output(reader *bufio.Reader) (bool, error) {
return false, &parseError{}
}

fmt.Fprintln(l.writer, parsedLog)
fmt.Fprintf(l.writer, "%s\r\n", parsedLog)
return false, nil
}

Expand Down
4 changes: 2 additions & 2 deletions buildlog/buildlog_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func TestRun(t *testing.T) {

select {
case <-done:
expected := "main: test 1\nmain: test 2\n"
expected := "main: test 1\r\nmain: test 2\r\n"
assert.Equal(t, expected, writer.String())
case <-timeout:
assert.Fail(t, "timeout stop buildlog")
Expand Down Expand Up @@ -121,7 +121,7 @@ func TestRun(t *testing.T) {

select {
case <-done:
expected := "main: test 1\nmain: long input " + string(longBuffer) + "\nmain: test 3\n"
expected := "main: test 1\r\nmain: long input " + string(longBuffer) + "\r\nmain: test 3\r\n"
assert.Equal(t, expected, writer.String())
case <-timeout:
assert.Fail(t, "timeout stop buildlog")
Expand Down

0 comments on commit 949bb6d

Please sign in to comment.