mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-30 05:41:12 +00:00
19 lines
303 B
Go
19 lines
303 B
Go
|
package rpc
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
func TestLine(t *testing.T) {
|
||
|
line := Line{
|
||
|
Proc: "redis",
|
||
|
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)
|
||
|
}
|
||
|
}
|