Debian Codegraph @

plumbing/protocol/packp/sideband/demux_test.go

raw symbols SCIP
1 package sidebandscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/
2
3 import (
4 "bytesscip-go gomod github.com/golang/go/src go1.25.0 bytes/"
5 "errorsscip-go gomod github.com/golang/go/src go1.25.0 errors/"
6 "ioscip-go gomod github.com/golang/go/src go1.25.0 io/"
7 "testingscip-go gomod github.com/golang/go/src go1.25.0 testing/"
8
9 "github.com/stretchr/testify/suitescip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/suite`/"
10
11 "github.com/go-git/go-git/v6/plumbing/format/pktlinescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/"
12 )
13
14 type SidebandSuitescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/SidebandSuite# struct {
15 suitescip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/suite`/.Suitescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/SidebandSuite#Suite.
16 }
17
18 func TestSidebandSuitescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/TestSidebandSuite().(t *testingscip-go gomod github.com/golang/go/src go1.25.0 testing/.Tscip-go gomod github.com/golang/go/src go1.25.0 testing/T#) {
19 t.Parallelscip-go gomod github.com/golang/go/src go1.25.0 testing/T#Parallel().()
20 suitescip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/suite`/.Runscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/suite`/Run().(t, new(SidebandSuitescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/SidebandSuite#))
21 }
22
23 func (s *SidebandSuitescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/SidebandSuite#) TestDecodescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/SidebandSuite#TestDecode().() {
24 expected := []byte("abcdefghijklmnopqrstuvwxyz")
25
26 buf := bytesscip-go gomod github.com/golang/go/src go1.25.0 bytes/.NewBufferscip-go gomod github.com/golang/go/src go1.25.0 bytes/NewBuffer().(nil)
27 pktlinescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/.Writescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/Write().(buf, PackDatascip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/PackData..WithPayloadscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/Channel#WithPayload().(expected[0:8]))
28 pktlinescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/.Writescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/Write().(buf, ProgressMessagescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/ProgressMessage..WithPayloadscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/Channel#WithPayload().([]byte{'F', 'O', 'O', '\n'}))
29 pktlinescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/.Writescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/Write().(buf, PackDatascip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/PackData..WithPayloadscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/Channel#WithPayload().(expected[8:16]))
30 pktlinescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/.Writescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/Write().(buf, PackDatascip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/PackData..WithPayloadscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/Channel#WithPayload().(expected[16:26]))
31
32 content := make([]byte, 26)
33 d := NewDemuxerscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/NewDemuxer().(Sideband64kscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/Sideband64k., buf)
34 n, err := ioscip-go gomod github.com/golang/go/src go1.25.0 io/.ReadFullscip-go gomod github.com/golang/go/src go1.25.0 io/ReadFull().(d, content)
35 s.NoErrorscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Assertions#NoError().(err)
36 s.Equalscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Assertions#Equal().(26, n)
37 s.Equalscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Assertions#Equal().(expected, content)
38 }
39
40 func (s *SidebandSuitescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/SidebandSuite#) TestDecodeMoreThanContainscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/SidebandSuite#TestDecodeMoreThanContain().() {
41 expected := []byte("abcdefghijklmnopqrstuvwxyz")
42
43 buf := bytesscip-go gomod github.com/golang/go/src go1.25.0 bytes/.NewBufferscip-go gomod github.com/golang/go/src go1.25.0 bytes/NewBuffer().(nil)
44 pktlinescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/.Writescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/Write().(buf, PackDatascip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/PackData..WithPayloadscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/Channel#WithPayload().(expected))
45
46 content := make([]byte, 42)
47 d := NewDemuxerscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/NewDemuxer().(Sideband64kscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/Sideband64k., buf)
48 n, err := ioscip-go gomod github.com/golang/go/src go1.25.0 io/.ReadFullscip-go gomod github.com/golang/go/src go1.25.0 io/ReadFull().(d, content)
49 s.ErrorIsscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Assertions#ErrorIs().(err, ioscip-go gomod github.com/golang/go/src go1.25.0 io/.ErrUnexpectedEOFscip-go gomod github.com/golang/go/src go1.25.0 io/ErrUnexpectedEOF.)
50 s.Equalscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Assertions#Equal().(26, n)
51 s.Equalscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Assertions#Equal().(expected, content[0:26])
52 }
53
54 func (s *SidebandSuitescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/SidebandSuite#) TestDecodeWithErrorscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/SidebandSuite#TestDecodeWithError().() {
55 expected := []byte("abcdefghijklmnopqrstuvwxyz")
56
57 buf := bytesscip-go gomod github.com/golang/go/src go1.25.0 bytes/.NewBufferscip-go gomod github.com/golang/go/src go1.25.0 bytes/NewBuffer().(nil)
58 pktlinescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/.Writescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/Write().(buf, PackDatascip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/PackData..WithPayloadscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/Channel#WithPayload().(expected[0:8]))
59 pktlinescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/.Writescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/Write().(buf, ErrorMessagescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/ErrorMessage..WithPayloadscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/Channel#WithPayload().([]byte{'F', 'O', 'O', '\n'}))
60 pktlinescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/.Writescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/Write().(buf, PackDatascip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/PackData..WithPayloadscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/Channel#WithPayload().(expected[8:16]))
61 pktlinescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/.Writescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/Write().(buf, PackDatascip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/PackData..WithPayloadscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/Channel#WithPayload().(expected[16:26]))
62
63 content := make([]byte, 26)
64 d := NewDemuxerscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/NewDemuxer().(Sideband64kscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/Sideband64k., buf)
65 n, err := ioscip-go gomod github.com/golang/go/src go1.25.0 io/.ReadFullscip-go gomod github.com/golang/go/src go1.25.0 io/ReadFull().(d, content)
66 s.ErrorContainsscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Assertions#ErrorContains().(err, "unexpected error: FOO\n")
67 s.Equalscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Assertions#Equal().(8, n)
68 s.Equalscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Assertions#Equal().(expected[0:8], content[0:8])
69 }
70
71 type mockReaderscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/mockReader# struct{}
72
73 func (r *mockReaderscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/mockReader#) Readscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/mockReader#Read().([]byte) (int, error) { return 0, errorsscip-go gomod github.com/golang/go/src go1.25.0 errors/.Newscip-go gomod github.com/golang/go/src go1.25.0 errors/New().("foo") }
74
75 func (s *SidebandSuitescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/SidebandSuite#) TestDecodeFromFailingReaderscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/SidebandSuite#TestDecodeFromFailingReader().() {
76 content := make([]byte, 26)
77 d := NewDemuxerscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/NewDemuxer().(Sideband64kscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/Sideband64k., &mockReaderscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/mockReader#{})
78 n, err := ioscip-go gomod github.com/golang/go/src go1.25.0 io/.ReadFullscip-go gomod github.com/golang/go/src go1.25.0 io/ReadFull().(d, content)
79 s.ErrorContainsscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Assertions#ErrorContains().(err, "foo")
80 s.Equalscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Assertions#Equal().(0, n)
81 }
82
83 func (s *SidebandSuitescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/SidebandSuite#) TestDecodeWithProgressscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/SidebandSuite#TestDecodeWithProgress().() {
84 expected := []byte("abcdefghijklmnopqrstuvwxyz")
85
86 input := bytesscip-go gomod github.com/golang/go/src go1.25.0 bytes/.NewBufferscip-go gomod github.com/golang/go/src go1.25.0 bytes/NewBuffer().(nil)
87 pktlinescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/.Writescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/Write().(input, PackDatascip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/PackData..WithPayloadscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/Channel#WithPayload().(expected[0:8]))
88 pktlinescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/.Writescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/Write().(input, ProgressMessagescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/ProgressMessage..WithPayloadscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/Channel#WithPayload().([]byte{'F', 'O', 'O', '\n'}))
89 pktlinescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/.Writescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/Write().(input, PackDatascip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/PackData..WithPayloadscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/Channel#WithPayload().(expected[8:16]))
90 pktlinescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/.Writescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/Write().(input, PackDatascip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/PackData..WithPayloadscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/Channel#WithPayload().(expected[16:26]))
91
92 output := bytesscip-go gomod github.com/golang/go/src go1.25.0 bytes/.NewBufferscip-go gomod github.com/golang/go/src go1.25.0 bytes/NewBuffer().(nil)
93 content := make([]byte, 26)
94 d := NewDemuxerscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/NewDemuxer().(Sideband64kscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/Sideband64k., input)
95 d.Progressscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/Demuxer#Progress. = output
96
97 n, err := ioscip-go gomod github.com/golang/go/src go1.25.0 io/.ReadFullscip-go gomod github.com/golang/go/src go1.25.0 io/ReadFull().(d, content)
98 s.NoErrorscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Assertions#NoError().(err)
99 s.Equalscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Assertions#Equal().(26, n)
100 s.Equalscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Assertions#Equal().(expected, content)
101
102 progress, err := ioscip-go gomod github.com/golang/go/src go1.25.0 io/.ReadAllscip-go gomod github.com/golang/go/src go1.25.0 io/ReadAll().(output)
103 s.NoErrorscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Assertions#NoError().(err)
104 s.Equalscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Assertions#Equal().([]byte{'F', 'O', 'O', '\n'}, progress)
105 }
106
107 func (s *SidebandSuitescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/SidebandSuite#) TestDecodeFlushEOFscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/SidebandSuite#TestDecodeFlushEOF().() {
108 expected := []byte("abcdefghijklmnopqrstuvwxyz")
109
110 input := bytesscip-go gomod github.com/golang/go/src go1.25.0 bytes/.NewBufferscip-go gomod github.com/golang/go/src go1.25.0 bytes/NewBuffer().(nil)
111 pktlinescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/.Writescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/Write().(input, PackDatascip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/PackData..WithPayloadscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/Channel#WithPayload().(expected[0:8]))
112 pktlinescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/.Writescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/Write().(input, ProgressMessagescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/ProgressMessage..WithPayloadscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/Channel#WithPayload().([]byte{'F', 'O', 'O', '\n'}))
113 pktlinescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/.Writescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/Write().(input, PackDatascip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/PackData..WithPayloadscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/Channel#WithPayload().(expected[8:16]))
114 pktlinescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/.Writescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/Write().(input, PackDatascip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/PackData..WithPayloadscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/Channel#WithPayload().(expected[16:26]))
115 pktlinescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/.WriteFlushscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/WriteFlush().(input)
116 pktlinescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/.Writescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/Write().(input, PackDatascip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/PackData..WithPayloadscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/Channel#WithPayload().([]byte("bar\n")))
117
118 output := bytesscip-go gomod github.com/golang/go/src go1.25.0 bytes/.NewBufferscip-go gomod github.com/golang/go/src go1.25.0 bytes/NewBuffer().(nil)
119 content := bytesscip-go gomod github.com/golang/go/src go1.25.0 bytes/.NewBufferscip-go gomod github.com/golang/go/src go1.25.0 bytes/NewBuffer().(nil)
120 d := NewDemuxerscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/NewDemuxer().(Sideband64kscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/Sideband64k., input)
121 d.Progressscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/Demuxer#Progress. = output
122
123 n, err := content.ReadFromscip-go gomod github.com/golang/go/src go1.25.0 bytes/Buffer#ReadFrom().(d)
124 s.NoErrorscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Assertions#NoError().(err)
125 s.Equalscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Assertions#Equal().(int64(26), n)
126 s.Equalscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Assertions#Equal().(expected, content.Bytesscip-go gomod github.com/golang/go/src go1.25.0 bytes/Buffer#Bytes().())
127
128 progress, err := ioscip-go gomod github.com/golang/go/src go1.25.0 io/.ReadAllscip-go gomod github.com/golang/go/src go1.25.0 io/ReadAll().(output)
129 s.NoErrorscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Assertions#NoError().(err)
130 s.Equalscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Assertions#Equal().([]byte{'F', 'O', 'O', '\n'}, progress)
131 }
132
133 func (s *SidebandSuitescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/SidebandSuite#) TestDecodeWithUnknownChannelscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/SidebandSuite#TestDecodeWithUnknownChannel().() {
134 buf := bytesscip-go gomod github.com/golang/go/src go1.25.0 bytes/.NewBufferscip-go gomod github.com/golang/go/src go1.25.0 bytes/NewBuffer().(nil)
135 pktlinescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/.Writescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/Write().(buf, []byte{'4', 'F', 'O', 'O', '\n'})
136
137 content := make([]byte, 26)
138 d := NewDemuxerscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/NewDemuxer().(Sideband64kscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/Sideband64k., buf)
139 n, err := ioscip-go gomod github.com/golang/go/src go1.25.0 io/.ReadFullscip-go gomod github.com/golang/go/src go1.25.0 io/ReadFull().(d, content)
140 s.ErrorContainsscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Assertions#ErrorContains().(err, "unknown channel 4FOO\n")
141 s.Equalscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Assertions#Equal().(0, n)
142 }
143
144 func (s *SidebandSuitescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/SidebandSuite#) TestDecodeWithPendingscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/SidebandSuite#TestDecodeWithPending().() {
145 expected := []byte("abcdefghijklmnopqrstuvwxyz")
146
147 buf := bytesscip-go gomod github.com/golang/go/src go1.25.0 bytes/.NewBufferscip-go gomod github.com/golang/go/src go1.25.0 bytes/NewBuffer().(nil)
148 pktlinescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/.Writescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/Write().(buf, PackDatascip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/PackData..WithPayloadscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/Channel#WithPayload().(expected[0:8]))
149 pktlinescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/.Writescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/Write().(buf, PackDatascip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/PackData..WithPayloadscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/Channel#WithPayload().(expected[8:16]))
150 pktlinescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/.Writescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/Write().(buf, PackDatascip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/PackData..WithPayloadscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/Channel#WithPayload().(expected[16:26]))
151
152 content := make([]byte, 13)
153 d := NewDemuxerscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/NewDemuxer().(Sideband64kscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/Sideband64k., buf)
154 n, err := ioscip-go gomod github.com/golang/go/src go1.25.0 io/.ReadFullscip-go gomod github.com/golang/go/src go1.25.0 io/ReadFull().(d, content)
155 s.NoErrorscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Assertions#NoError().(err)
156 s.Equalscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Assertions#Equal().(13, n)
157 s.Equalscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Assertions#Equal().(expected[0:13], content)
158
159 n, err = d.Readscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/Demuxer#Read().(content)
160 s.NoErrorscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Assertions#NoError().(err)
161 s.Equalscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Assertions#Equal().(13, n)
162 s.Equalscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Assertions#Equal().(expected[13:26], content)
163 }
164
165 func (s *SidebandSuitescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/SidebandSuite#) TestDecodeErrMaxPackedscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/SidebandSuite#TestDecodeErrMaxPacked().() {
166 buf := bytesscip-go gomod github.com/golang/go/src go1.25.0 bytes/.NewBufferscip-go gomod github.com/golang/go/src go1.25.0 bytes/NewBuffer().(nil)
167 pktlinescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/.Writescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/format/pktline`/Write().(buf, PackDatascip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/PackData..WithPayloadscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/Channel#WithPayload().(bytesscip-go gomod github.com/golang/go/src go1.25.0 bytes/.Repeatscip-go gomod github.com/golang/go/src go1.25.0 bytes/Repeat().([]byte{'0'}, MaxPackedSizescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/MaxPackedSize.+1)))
168
169 content := make([]byte, 13)
170 d := NewDemuxerscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/NewDemuxer().(Sidebandscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/Sideband., buf)
171 n, err := ioscip-go gomod github.com/golang/go/src go1.25.0 io/.ReadFullscip-go gomod github.com/golang/go/src go1.25.0 io/ReadFull().(d, content)
172 s.ErrorIsscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Assertions#ErrorIs().(err, ErrMaxPackedExceededscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/protocol/packp/sideband`/ErrMaxPackedExceeded.)
173 s.Equalscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Assertions#Equal().(0, n)
174 }