woodpecker/pipeline/rpc/line_test.go

19 lines
303 B
Go
Raw Normal View History

2019-04-06 13:44:04 +00:00
package rpc
import (
"testing"
)
func TestLine(t *testing.T) {
line := Line{
Step: "redis",
2019-04-06 13:44:04 +00:00
Time: 60,
Pos: 1,
Out: "starting redis server",
}
got, want := line.String(), "[redis:L1:60s] starting redis server"
if got != want {
t.Errorf("Wanted line string %q, got %q", want, got)
}
}