detached ece7682

terminal_mock.go RawHistoryFolder

1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package portsmocks
6
7import (
8	"io"
9
10	"github.com/bnema/vev/internal/domain"
11	mock "github.com/stretchr/testify/mock"
12)
13
14// NewMockTerminal creates a new instance of MockTerminal. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
15// The first argument is typically a *testing.T value.
16func NewMockTerminal(t interface {
17	mock.TestingT
18	Cleanup(func())
19}) *MockTerminal {
20	if helper, ok := t.(interface{ Helper() }); ok {
21		helper.Helper()
22	}
23
24	mock := &MockTerminal{}
25	mock.Mock.Test(t)
26
27	t.Cleanup(func() {
28		if helper, ok := t.(interface{ Helper() }); ok {
29			helper.Helper()
30		}
31		mock.AssertExpectations(t)
32	})
33
34	return mock
35}
36
37// MockTerminal is an autogenerated mock type for the Terminal type
38type MockTerminal struct {
39	mock.Mock
40}
41
42type MockTerminal_Expecter struct {
43	mock *mock.Mock
44}
45
46func (_m *MockTerminal) EXPECT() *MockTerminal_Expecter {
47	return &MockTerminal_Expecter{mock: &_m.Mock}
48}
49
50// EnableKittyKeyboard provides a mock function for the type MockTerminal
51func (_mock *MockTerminal) EnableKittyKeyboard(flags int) error {
52	ret := _mock.Called(flags)
53
54	if len(ret) == 0 {
55		panic("no return value specified for EnableKittyKeyboard")
56	}
57
58	var r0 error
59	if returnFunc, ok := ret.Get(0).(func(int) error); ok {
60		r0 = returnFunc(flags)
61	} else {
62		r0 = ret.Error(0)
63	}
64	return r0
65}
66
67// MockTerminal_EnableKittyKeyboard_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnableKittyKeyboard'
68type MockTerminal_EnableKittyKeyboard_Call struct {
69	*mock.Call
70}
71
72// EnableKittyKeyboard is a helper method to define mock.On call
73//   - flags int
74func (_e *MockTerminal_Expecter) EnableKittyKeyboard(flags any) *MockTerminal_EnableKittyKeyboard_Call {
75	return &MockTerminal_EnableKittyKeyboard_Call{Call: _e.mock.On("EnableKittyKeyboard", flags)}
76}
77
78func (_c *MockTerminal_EnableKittyKeyboard_Call) Run(run func(flags int)) *MockTerminal_EnableKittyKeyboard_Call {
79	_c.Call.Run(func(args mock.Arguments) {
80		var arg0 int
81		if args[0] != nil {
82			arg0 = args[0].(int)
83		}
84		run(
85			arg0,
86		)
87	})
88	return _c
89}
90
91func (_c *MockTerminal_EnableKittyKeyboard_Call) Return(err error) *MockTerminal_EnableKittyKeyboard_Call {
92	_c.Call.Return(err)
93	return _c
94}
95
96func (_c *MockTerminal_EnableKittyKeyboard_Call) RunAndReturn(run func(flags int) error) *MockTerminal_EnableKittyKeyboard_Call {
97	_c.Call.Return(run)
98	return _c
99}
100
101// EnterRaw provides a mock function for the type MockTerminal
102func (_mock *MockTerminal) EnterRaw() (func() error, error) {
103	ret := _mock.Called()
104
105	if len(ret) == 0 {
106		panic("no return value specified for EnterRaw")
107	}
108
109	var r0 func() error
110	var r1 error
111	if returnFunc, ok := ret.Get(0).(func() (func() error, error)); ok {
112		return returnFunc()
113	}
114	if returnFunc, ok := ret.Get(0).(func() func() error); ok {
115		r0 = returnFunc()
116	} else {
117		if ret.Get(0) != nil {
118			r0 = ret.Get(0).(func() error)
119		}
120	}
121	if returnFunc, ok := ret.Get(1).(func() error); ok {
122		r1 = returnFunc()
123	} else {
124		r1 = ret.Error(1)
125	}
126	return r0, r1
127}
128
129// MockTerminal_EnterRaw_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnterRaw'
130type MockTerminal_EnterRaw_Call struct {
131	*mock.Call
132}
133
134// EnterRaw is a helper method to define mock.On call
135func (_e *MockTerminal_Expecter) EnterRaw() *MockTerminal_EnterRaw_Call {
136	return &MockTerminal_EnterRaw_Call{Call: _e.mock.On("EnterRaw")}
137}
138
139func (_c *MockTerminal_EnterRaw_Call) Run(run func()) *MockTerminal_EnterRaw_Call {
140	_c.Call.Run(func(args mock.Arguments) {
141		run()
142	})
143	return _c
144}
145
146func (_c *MockTerminal_EnterRaw_Call) Return(restore func() error, err error) *MockTerminal_EnterRaw_Call {
147	_c.Call.Return(restore, err)
148	return _c
149}
150
151func (_c *MockTerminal_EnterRaw_Call) RunAndReturn(run func() (func() error, error)) *MockTerminal_EnterRaw_Call {
152	_c.Call.Return(run)
153	return _c
154}
155
156// Flush provides a mock function for the type MockTerminal
157func (_mock *MockTerminal) Flush() error {
158	ret := _mock.Called()
159
160	if len(ret) == 0 {
161		panic("no return value specified for Flush")
162	}
163
164	var r0 error
165	if returnFunc, ok := ret.Get(0).(func() error); ok {
166		r0 = returnFunc()
167	} else {
168		r0 = ret.Error(0)
169	}
170	return r0
171}
172
173// MockTerminal_Flush_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Flush'
174type MockTerminal_Flush_Call struct {
175	*mock.Call
176}
177
178// Flush is a helper method to define mock.On call
179func (_e *MockTerminal_Expecter) Flush() *MockTerminal_Flush_Call {
180	return &MockTerminal_Flush_Call{Call: _e.mock.On("Flush")}
181}
182
183func (_c *MockTerminal_Flush_Call) Run(run func()) *MockTerminal_Flush_Call {
184	_c.Call.Run(func(args mock.Arguments) {
185		run()
186	})
187	return _c
188}
189
190func (_c *MockTerminal_Flush_Call) Return(err error) *MockTerminal_Flush_Call {
191	_c.Call.Return(err)
192	return _c
193}
194
195func (_c *MockTerminal_Flush_Call) RunAndReturn(run func() error) *MockTerminal_Flush_Call {
196	_c.Call.Return(run)
197	return _c
198}
199
200// Geometry provides a mock function for the type MockTerminal
201func (_mock *MockTerminal) Geometry() (domain.Geometry, error) {
202	ret := _mock.Called()
203
204	if len(ret) == 0 {
205		panic("no return value specified for Geometry")
206	}
207
208	var r0 domain.Geometry
209	var r1 error
210	if returnFunc, ok := ret.Get(0).(func() (domain.Geometry, error)); ok {
211		return returnFunc()
212	}
213	if returnFunc, ok := ret.Get(0).(func() domain.Geometry); ok {
214		r0 = returnFunc()
215	} else {
216		r0 = ret.Get(0).(domain.Geometry)
217	}
218	if returnFunc, ok := ret.Get(1).(func() error); ok {
219		r1 = returnFunc()
220	} else {
221		r1 = ret.Error(1)
222	}
223	return r0, r1
224}
225
226// MockTerminal_Geometry_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Geometry'
227type MockTerminal_Geometry_Call struct {
228	*mock.Call
229}
230
231// Geometry is a helper method to define mock.On call
232func (_e *MockTerminal_Expecter) Geometry() *MockTerminal_Geometry_Call {
233	return &MockTerminal_Geometry_Call{Call: _e.mock.On("Geometry")}
234}
235
236func (_c *MockTerminal_Geometry_Call) Run(run func()) *MockTerminal_Geometry_Call {
237	_c.Call.Run(func(args mock.Arguments) {
238		run()
239	})
240	return _c
241}
242
243func (_c *MockTerminal_Geometry_Call) Return(geometry domain.Geometry, err error) *MockTerminal_Geometry_Call {
244	_c.Call.Return(geometry, err)
245	return _c
246}
247
248func (_c *MockTerminal_Geometry_Call) RunAndReturn(run func() (domain.Geometry, error)) *MockTerminal_Geometry_Call {
249	_c.Call.Return(run)
250	return _c
251}
252
253// In provides a mock function for the type MockTerminal
254func (_mock *MockTerminal) In() io.Reader {
255	ret := _mock.Called()
256
257	if len(ret) == 0 {
258		panic("no return value specified for In")
259	}
260
261	var r0 io.Reader
262	if returnFunc, ok := ret.Get(0).(func() io.Reader); ok {
263		r0 = returnFunc()
264	} else {
265		if ret.Get(0) != nil {
266			r0 = ret.Get(0).(io.Reader)
267		}
268	}
269	return r0
270}
271
272// MockTerminal_In_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'In'
273type MockTerminal_In_Call struct {
274	*mock.Call
275}
276
277// In is a helper method to define mock.On call
278func (_e *MockTerminal_Expecter) In() *MockTerminal_In_Call {
279	return &MockTerminal_In_Call{Call: _e.mock.On("In")}
280}
281
282func (_c *MockTerminal_In_Call) Run(run func()) *MockTerminal_In_Call {
283	_c.Call.Run(func(args mock.Arguments) {
284		run()
285	})
286	return _c
287}
288
289func (_c *MockTerminal_In_Call) Return(reader io.Reader) *MockTerminal_In_Call {
290	_c.Call.Return(reader)
291	return _c
292}
293
294func (_c *MockTerminal_In_Call) RunAndReturn(run func() io.Reader) *MockTerminal_In_Call {
295	_c.Call.Return(run)
296	return _c
297}
298
299// Out provides a mock function for the type MockTerminal
300func (_mock *MockTerminal) Out() io.Writer {
301	ret := _mock.Called()
302
303	if len(ret) == 0 {
304		panic("no return value specified for Out")
305	}
306
307	var r0 io.Writer
308	if returnFunc, ok := ret.Get(0).(func() io.Writer); ok {
309		r0 = returnFunc()
310	} else {
311		if ret.Get(0) != nil {
312			r0 = ret.Get(0).(io.Writer)
313		}
314	}
315	return r0
316}
317
318// MockTerminal_Out_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Out'
319type MockTerminal_Out_Call struct {
320	*mock.Call
321}
322
323// Out is a helper method to define mock.On call
324func (_e *MockTerminal_Expecter) Out() *MockTerminal_Out_Call {
325	return &MockTerminal_Out_Call{Call: _e.mock.On("Out")}
326}
327
328func (_c *MockTerminal_Out_Call) Run(run func()) *MockTerminal_Out_Call {
329	_c.Call.Run(func(args mock.Arguments) {
330		run()
331	})
332	return _c
333}
334
335func (_c *MockTerminal_Out_Call) Return(writer io.Writer) *MockTerminal_Out_Call {
336	_c.Call.Return(writer)
337	return _c
338}
339
340func (_c *MockTerminal_Out_Call) RunAndReturn(run func() io.Writer) *MockTerminal_Out_Call {
341	_c.Call.Return(run)
342	return _c
343}
344
345// ResizeEvents provides a mock function for the type MockTerminal
346func (_mock *MockTerminal) ResizeEvents() <-chan domain.Geometry {
347	ret := _mock.Called()
348
349	if len(ret) == 0 {
350		panic("no return value specified for ResizeEvents")
351	}
352
353	var r0 <-chan domain.Geometry
354	if returnFunc, ok := ret.Get(0).(func() <-chan domain.Geometry); ok {
355		r0 = returnFunc()
356	} else {
357		if ret.Get(0) != nil {
358			r0 = ret.Get(0).(<-chan domain.Geometry)
359		}
360	}
361	return r0
362}
363
364// MockTerminal_ResizeEvents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResizeEvents'
365type MockTerminal_ResizeEvents_Call struct {
366	*mock.Call
367}
368
369// ResizeEvents is a helper method to define mock.On call
370func (_e *MockTerminal_Expecter) ResizeEvents() *MockTerminal_ResizeEvents_Call {
371	return &MockTerminal_ResizeEvents_Call{Call: _e.mock.On("ResizeEvents")}
372}
373
374func (_c *MockTerminal_ResizeEvents_Call) Run(run func()) *MockTerminal_ResizeEvents_Call {
375	_c.Call.Run(func(args mock.Arguments) {
376		run()
377	})
378	return _c
379}
380
381func (_c *MockTerminal_ResizeEvents_Call) Return(geometryCh <-chan domain.Geometry) *MockTerminal_ResizeEvents_Call {
382	_c.Call.Return(geometryCh)
383	return _c
384}
385
386func (_c *MockTerminal_ResizeEvents_Call) RunAndReturn(run func() <-chan domain.Geometry) *MockTerminal_ResizeEvents_Call {
387	_c.Call.Return(run)
388	return _c
389}

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 12

Tags 11

↑↓ moveenter openesc close