v0.7.2 71ebe61

Clipboard_mock_test.go RawHistoryFolder

1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package edit
6
7import (
8	mock "github.com/stretchr/testify/mock"
9)
10
11// NewMockClipboard creates a new instance of MockClipboard. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
12// The first argument is typically a *testing.T value.
13func NewMockClipboard(t interface {
14	mock.TestingT
15	Cleanup(func())
16}) *MockClipboard {
17	if helper, ok := t.(interface{ Helper() }); ok {
18		helper.Helper()
19	}
20
21	mock := &MockClipboard{}
22	mock.Mock.Test(t)
23
24	t.Cleanup(func() {
25		if helper, ok := t.(interface{ Helper() }); ok {
26			helper.Helper()
27		}
28		mock.AssertExpectations(t)
29	})
30
31	return mock
32}
33
34// MockClipboard is an autogenerated mock type for the Clipboard type
35type MockClipboard struct {
36	mock.Mock
37}
38
39type MockClipboard_Expecter struct {
40	mock *mock.Mock
41}
42
43func (_m *MockClipboard) EXPECT() *MockClipboard_Expecter {
44	return &MockClipboard_Expecter{mock: &_m.Mock}
45}
46
47// ReadText provides a mock function for the type MockClipboard
48func (_mock *MockClipboard) ReadText(limit int) ([]byte, error) {
49	ret := _mock.Called(limit)
50
51	if len(ret) == 0 {
52		panic("no return value specified for ReadText")
53	}
54
55	var r0 []byte
56	var r1 error
57	if returnFunc, ok := ret.Get(0).(func(int) ([]byte, error)); ok {
58		return returnFunc(limit)
59	}
60	if returnFunc, ok := ret.Get(0).(func(int) []byte); ok {
61		r0 = returnFunc(limit)
62	} else {
63		if ret.Get(0) != nil {
64			r0 = ret.Get(0).([]byte)
65		}
66	}
67	if returnFunc, ok := ret.Get(1).(func(int) error); ok {
68		r1 = returnFunc(limit)
69	} else {
70		r1 = ret.Error(1)
71	}
72	return r0, r1
73}
74
75// MockClipboard_ReadText_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReadText'
76type MockClipboard_ReadText_Call struct {
77	*mock.Call
78}
79
80// ReadText is a helper method to define mock.On call
81//   - limit int
82func (_e *MockClipboard_Expecter) ReadText(limit any) *MockClipboard_ReadText_Call {
83	return &MockClipboard_ReadText_Call{Call: _e.mock.On("ReadText", limit)}
84}
85
86func (_c *MockClipboard_ReadText_Call) Run(run func(limit int)) *MockClipboard_ReadText_Call {
87	_c.Call.Run(func(args mock.Arguments) {
88		var arg0 int
89		if args[0] != nil {
90			arg0 = args[0].(int)
91		}
92		run(
93			arg0,
94		)
95	})
96	return _c
97}
98
99func (_c *MockClipboard_ReadText_Call) Return(bytes []byte, err error) *MockClipboard_ReadText_Call {
100	_c.Call.Return(bytes, err)
101	return _c
102}
103
104func (_c *MockClipboard_ReadText_Call) RunAndReturn(run func(limit int) ([]byte, error)) *MockClipboard_ReadText_Call {
105	_c.Call.Return(run)
106	return _c
107}
108
109// WriteText provides a mock function for the type MockClipboard
110func (_mock *MockClipboard) WriteText(bytes []byte) error {
111	ret := _mock.Called(bytes)
112
113	if len(ret) == 0 {
114		panic("no return value specified for WriteText")
115	}
116
117	var r0 error
118	if returnFunc, ok := ret.Get(0).(func([]byte) error); ok {
119		r0 = returnFunc(bytes)
120	} else {
121		r0 = ret.Error(0)
122	}
123	return r0
124}
125
126// MockClipboard_WriteText_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WriteText'
127type MockClipboard_WriteText_Call struct {
128	*mock.Call
129}
130
131// WriteText is a helper method to define mock.On call
132//   - bytes []byte
133func (_e *MockClipboard_Expecter) WriteText(bytes any) *MockClipboard_WriteText_Call {
134	return &MockClipboard_WriteText_Call{Call: _e.mock.On("WriteText", bytes)}
135}
136
137func (_c *MockClipboard_WriteText_Call) Run(run func(bytes []byte)) *MockClipboard_WriteText_Call {
138	_c.Call.Run(func(args mock.Arguments) {
139		var arg0 []byte
140		if args[0] != nil {
141			arg0 = args[0].([]byte)
142		}
143		run(
144			arg0,
145		)
146	})
147	return _c
148}
149
150func (_c *MockClipboard_WriteText_Call) Return(err error) *MockClipboard_WriteText_Call {
151	_c.Call.Return(err)
152	return _c
153}
154
155func (_c *MockClipboard_WriteText_Call) RunAndReturn(run func(bytes []byte) error) *MockClipboard_WriteText_Call {
156	_c.Call.Return(run)
157	return _c
158}

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 1

Tags 12

↑↓ moveenter openesc close