blob: 477fba9bd7424c596e958ae6e8c289773b21bdc2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
package gittest
import (
"io"
"testing"
"github.com/stretchr/testify/require"
"gitlab.com/gitlab-org/gitaly/internal/git/pktline"
)
// WritePktlineString writes the pktline-formatted data into the writer.
func WritePktlineString(t *testing.T, writer io.Writer, data string) {
_, err := pktline.WriteString(writer, data)
require.NoError(t, err)
}
// WritePktlineFlush writes the pktline-formatted flush into the writer.
func WritePktlineFlush(t *testing.T, writer io.Writer) {
require.NoError(t, pktline.WriteFlush(writer))
}
// WritePktlineDelim writes the pktline-formatted delimiter into the writer.
func WritePktlineDelim(t *testing.T, writer io.Writer) {
require.NoError(t, pktline.WriteDelim(writer))
}
|