v0.1.0 602baa7

replies_fuzz_test.go RawHistoryFolder

1// Code generated by xtgen; DO NOT EDIT.
2package xproto
3
4import "testing"
5import "bnema.dev/xturbo/internal/xtest"
6
7func FuzzParseGetWindowAttributesReply(f *testing.F) {
8	f.Add(make([]byte, 44))
9	if raw, err := xtest.LoadHex("../testdata/golden/xproto/GetWindowAttributes.reply.hex"); err != nil {
10		f.Fatal(err)
11	} else {
12		f.Add(raw)
13	}
14	f.Fuzz(func(t *testing.T, raw []byte) {
15		r, ok := ParseGetWindowAttributesReply(raw)
16		if !ok {
17			if len(raw) >= 44 {
18				t.Fatal("rejected a complete fixed-size reply")
19			}
20			return
21		}
22		if len(r.Raw()) != len(raw) {
23			t.Fatal("Raw must return the parsed bytes")
24		}
25		_ = r.BackingStore()
26		_ = r.Visual()
27		_ = r.Class()
28		_ = r.BitGravity()
29		_ = r.WinGravity()
30		_ = r.BackingPlanes()
31		_ = r.BackingPixel()
32		_ = r.SaveUnder()
33		_ = r.MapIsInstalled()
34		_ = r.MapState()
35		_ = r.OverrideRedirect()
36		_ = r.Colormap()
37		_ = r.AllEventMasks()
38		_ = r.YourEventMask()
39		_ = r.DoNotPropagateMask()
40	})
41}
42
43func FuzzParseGetGeometryReply(f *testing.F) {
44	f.Add(make([]byte, 32))
45	if raw, err := xtest.LoadHex("../testdata/golden/xproto/GetGeometry.reply.hex"); err != nil {
46		f.Fatal(err)
47	} else {
48		f.Add(raw)
49	}
50	f.Fuzz(func(t *testing.T, raw []byte) {
51		r, ok := ParseGetGeometryReply(raw)
52		if !ok {
53			if len(raw) >= 32 {
54				t.Fatal("rejected a complete fixed-size reply")
55			}
56			return
57		}
58		if len(r.Raw()) != len(raw) {
59			t.Fatal("Raw must return the parsed bytes")
60		}
61		_ = r.Depth()
62		_ = r.Root()
63		_ = r.X()
64		_ = r.Y()
65		_ = r.Width()
66		_ = r.Height()
67		_ = r.BorderWidth()
68	})
69}
70
71func FuzzParseQueryTreeReply(f *testing.F) {
72	f.Add(make([]byte, 32))
73	if raw, err := xtest.LoadHex("../testdata/golden/xproto/QueryTree.reply.hex"); err != nil {
74		f.Fatal(err)
75	} else {
76		f.Add(raw)
77	}
78	f.Fuzz(func(t *testing.T, raw []byte) {
79		r, ok := ParseQueryTreeReply(raw)
80		if !ok {
81			return
82		}
83		if len(r.Raw()) != len(raw) {
84			t.Fatal("Raw must return the parsed bytes")
85		}
86		_ = r.Root()
87		_ = r.Parent()
88		_ = r.ChildrenLen()
89		{
90			l0 := r.Children()
91			for i := 0; i < l0.Len(); i++ {
92				_ = l0.At(i)
93			}
94		}
95	})
96}
97
98func FuzzParseInternAtomReply(f *testing.F) {
99	f.Add(make([]byte, 32))
100	if raw, err := xtest.LoadHex("../testdata/golden/xproto/InternAtom.reply.hex"); err != nil {
101		f.Fatal(err)
102	} else {
103		f.Add(raw)
104	}
105	f.Fuzz(func(t *testing.T, raw []byte) {
106		r, ok := ParseInternAtomReply(raw)
107		if !ok {
108			if len(raw) >= 32 {
109				t.Fatal("rejected a complete fixed-size reply")
110			}
111			return
112		}
113		if len(r.Raw()) != len(raw) {
114			t.Fatal("Raw must return the parsed bytes")
115		}
116		_ = r.Atom()
117	})
118}
119
120func FuzzParseGetAtomNameReply(f *testing.F) {
121	f.Add(make([]byte, 32))
122	f.Fuzz(func(t *testing.T, raw []byte) {
123		r, ok := ParseGetAtomNameReply(raw)
124		if !ok {
125			return
126		}
127		if len(r.Raw()) != len(raw) {
128			t.Fatal("Raw must return the parsed bytes")
129		}
130		_ = r.NameLen()
131		_ = len(r.Name())
132	})
133}
134
135func FuzzParseGetPropertyReply(f *testing.F) {
136	f.Add(make([]byte, 32))
137	if raw, err := xtest.LoadHex("../testdata/golden/xproto/GetProperty.reply.hex"); err != nil {
138		f.Fatal(err)
139	} else {
140		f.Add(raw)
141	}
142	if raw, err := xtest.LoadHex("../testdata/golden/xproto/GetPropertyEmpty.reply.hex"); err != nil {
143		f.Fatal(err)
144	} else {
145		f.Add(raw)
146	}
147	f.Fuzz(func(t *testing.T, raw []byte) {
148		r, ok := ParseGetPropertyReply(raw)
149		if !ok {
150			return
151		}
152		if len(r.Raw()) != len(raw) {
153			t.Fatal("Raw must return the parsed bytes")
154		}
155		_ = r.Format()
156		_ = r.Type()
157		_ = r.BytesAfter()
158		_ = r.ValueLen()
159		_ = len(r.Value())
160	})
161}
162
163func FuzzParseListPropertiesReply(f *testing.F) {
164	f.Add(make([]byte, 32))
165	f.Fuzz(func(t *testing.T, raw []byte) {
166		r, ok := ParseListPropertiesReply(raw)
167		if !ok {
168			return
169		}
170		if len(r.Raw()) != len(raw) {
171			t.Fatal("Raw must return the parsed bytes")
172		}
173		_ = r.AtomsLen()
174		{
175			l0 := r.Atoms()
176			for i := 0; i < l0.Len(); i++ {
177				_ = l0.At(i)
178			}
179		}
180	})
181}
182
183func FuzzParseGetSelectionOwnerReply(f *testing.F) {
184	f.Add(make([]byte, 32))
185	f.Fuzz(func(t *testing.T, raw []byte) {
186		r, ok := ParseGetSelectionOwnerReply(raw)
187		if !ok {
188			if len(raw) >= 32 {
189				t.Fatal("rejected a complete fixed-size reply")
190			}
191			return
192		}
193		if len(r.Raw()) != len(raw) {
194			t.Fatal("Raw must return the parsed bytes")
195		}
196		_ = r.Owner()
197	})
198}
199
200func FuzzParseGrabPointerReply(f *testing.F) {
201	f.Add(make([]byte, 32))
202	f.Fuzz(func(t *testing.T, raw []byte) {
203		r, ok := ParseGrabPointerReply(raw)
204		if !ok {
205			if len(raw) >= 32 {
206				t.Fatal("rejected a complete fixed-size reply")
207			}
208			return
209		}
210		if len(r.Raw()) != len(raw) {
211			t.Fatal("Raw must return the parsed bytes")
212		}
213		_ = r.Status()
214	})
215}
216
217func FuzzParseGrabKeyboardReply(f *testing.F) {
218	f.Add(make([]byte, 32))
219	f.Fuzz(func(t *testing.T, raw []byte) {
220		r, ok := ParseGrabKeyboardReply(raw)
221		if !ok {
222			if len(raw) >= 32 {
223				t.Fatal("rejected a complete fixed-size reply")
224			}
225			return
226		}
227		if len(r.Raw()) != len(raw) {
228			t.Fatal("Raw must return the parsed bytes")
229		}
230		_ = r.Status()
231	})
232}
233
234func FuzzParseQueryPointerReply(f *testing.F) {
235	f.Add(make([]byte, 32))
236	f.Fuzz(func(t *testing.T, raw []byte) {
237		r, ok := ParseQueryPointerReply(raw)
238		if !ok {
239			if len(raw) >= 32 {
240				t.Fatal("rejected a complete fixed-size reply")
241			}
242			return
243		}
244		if len(r.Raw()) != len(raw) {
245			t.Fatal("Raw must return the parsed bytes")
246		}
247		_ = r.SameScreen()
248		_ = r.Root()
249		_ = r.Child()
250		_ = r.RootX()
251		_ = r.RootY()
252		_ = r.WinX()
253		_ = r.WinY()
254		_ = r.Mask()
255	})
256}
257
258func FuzzParseGetMotionEventsReply(f *testing.F) {
259	f.Add(make([]byte, 32))
260	f.Fuzz(func(t *testing.T, raw []byte) {
261		r, ok := ParseGetMotionEventsReply(raw)
262		if !ok {
263			return
264		}
265		if len(r.Raw()) != len(raw) {
266			t.Fatal("Raw must return the parsed bytes")
267		}
268		_ = r.EventsLen()
269		{
270			l0 := r.Events()
271			for i := 0; i < l0.Len(); i++ {
272				_ = l0.At(i)
273			}
274		}
275	})
276}
277
278func FuzzParseTranslateCoordinatesReply(f *testing.F) {
279	f.Add(make([]byte, 32))
280	f.Fuzz(func(t *testing.T, raw []byte) {
281		r, ok := ParseTranslateCoordinatesReply(raw)
282		if !ok {
283			if len(raw) >= 32 {
284				t.Fatal("rejected a complete fixed-size reply")
285			}
286			return
287		}
288		if len(r.Raw()) != len(raw) {
289			t.Fatal("Raw must return the parsed bytes")
290		}
291		_ = r.SameScreen()
292		_ = r.Child()
293		_ = r.DstX()
294		_ = r.DstY()
295	})
296}
297
298func FuzzParseGetInputFocusReply(f *testing.F) {
299	f.Add(make([]byte, 32))
300	f.Fuzz(func(t *testing.T, raw []byte) {
301		r, ok := ParseGetInputFocusReply(raw)
302		if !ok {
303			if len(raw) >= 32 {
304				t.Fatal("rejected a complete fixed-size reply")
305			}
306			return
307		}
308		if len(r.Raw()) != len(raw) {
309			t.Fatal("Raw must return the parsed bytes")
310		}
311		_ = r.RevertTo()
312		_ = r.Focus()
313	})
314}
315
316func FuzzParseQueryKeymapReply(f *testing.F) {
317	f.Add(make([]byte, 40))
318	f.Fuzz(func(t *testing.T, raw []byte) {
319		r, ok := ParseQueryKeymapReply(raw)
320		if !ok {
321			if len(raw) >= 40 {
322				t.Fatal("rejected a complete fixed-size reply")
323			}
324			return
325		}
326		if len(r.Raw()) != len(raw) {
327			t.Fatal("Raw must return the parsed bytes")
328		}
329		_ = len(r.Keys())
330	})
331}
332
333func FuzzParseQueryFontReply(f *testing.F) {
334	f.Add(make([]byte, 60))
335	f.Fuzz(func(t *testing.T, raw []byte) {
336		r, ok := ParseQueryFontReply(raw)
337		if !ok {
338			return
339		}
340		if len(r.Raw()) != len(raw) {
341			t.Fatal("Raw must return the parsed bytes")
342		}
343		_ = r.MinBounds()
344		_ = r.MaxBounds()
345		_ = r.MinCharOrByte2()
346		_ = r.MaxCharOrByte2()
347		_ = r.DefaultChar()
348		_ = r.PropertiesLen()
349		_ = r.DrawDirection()
350		_ = r.MinByte1()
351		_ = r.MaxByte1()
352		_ = r.AllCharsExist()
353		_ = r.FontAscent()
354		_ = r.FontDescent()
355		_ = r.CharInfosLen()
356		{
357			l0 := r.Properties()
358			for i := 0; i < l0.Len(); i++ {
359				_ = l0.At(i)
360			}
361		}
362		{
363			l0 := r.CharInfos()
364			for i := 0; i < l0.Len(); i++ {
365				_ = l0.At(i)
366			}
367		}
368	})
369}
370
371func FuzzParseQueryTextExtentsReply(f *testing.F) {
372	f.Add(make([]byte, 32))
373	f.Fuzz(func(t *testing.T, raw []byte) {
374		r, ok := ParseQueryTextExtentsReply(raw)
375		if !ok {
376			if len(raw) >= 32 {
377				t.Fatal("rejected a complete fixed-size reply")
378			}
379			return
380		}
381		if len(r.Raw()) != len(raw) {
382			t.Fatal("Raw must return the parsed bytes")
383		}
384		_ = r.DrawDirection()
385		_ = r.FontAscent()
386		_ = r.FontDescent()
387		_ = r.OverallAscent()
388		_ = r.OverallDescent()
389		_ = r.OverallWidth()
390		_ = r.OverallLeft()
391		_ = r.OverallRight()
392	})
393}
394
395func FuzzParseListFontsReply(f *testing.F) {
396	f.Add(make([]byte, 32))
397	f.Fuzz(func(t *testing.T, raw []byte) {
398		r, ok := ParseListFontsReply(raw)
399		if !ok {
400			return
401		}
402		if len(r.Raw()) != len(raw) {
403			t.Fatal("Raw must return the parsed bytes")
404		}
405		_ = r.NamesLen()
406		{
407			it0 := r.Names()
408			for it0.Next() {
409				_ = it0.Value().NameLen()
410				_ = len(it0.Value().Name())
411			}
412			if it0.Err() {
413				t.Fatal("iterator error after successful Parse")
414			}
415		}
416	})
417}
418
419func FuzzParseListFontsWithInfoReply(f *testing.F) {
420	f.Add(make([]byte, 60))
421	f.Fuzz(func(t *testing.T, raw []byte) {
422		r, ok := ParseListFontsWithInfoReply(raw)
423		if !ok {
424			return
425		}
426		if len(r.Raw()) != len(raw) {
427			t.Fatal("Raw must return the parsed bytes")
428		}
429		_ = r.NameLen()
430		_ = r.MinBounds()
431		_ = r.MaxBounds()
432		_ = r.MinCharOrByte2()
433		_ = r.MaxCharOrByte2()
434		_ = r.DefaultChar()
435		_ = r.PropertiesLen()
436		_ = r.DrawDirection()
437		_ = r.MinByte1()
438		_ = r.MaxByte1()
439		_ = r.AllCharsExist()
440		_ = r.FontAscent()
441		_ = r.FontDescent()
442		_ = r.RepliesHint()
443		{
444			l0 := r.Properties()
445			for i := 0; i < l0.Len(); i++ {
446				_ = l0.At(i)
447			}
448		}
449		_ = len(r.Name())
450	})
451}
452
453func FuzzParseGetFontPathReply(f *testing.F) {
454	f.Add(make([]byte, 32))
455	f.Fuzz(func(t *testing.T, raw []byte) {
456		r, ok := ParseGetFontPathReply(raw)
457		if !ok {
458			return
459		}
460		if len(r.Raw()) != len(raw) {
461			t.Fatal("Raw must return the parsed bytes")
462		}
463		_ = r.PathLen()
464		{
465			it0 := r.Path()
466			for it0.Next() {
467				_ = it0.Value().NameLen()
468				_ = len(it0.Value().Name())
469			}
470			if it0.Err() {
471				t.Fatal("iterator error after successful Parse")
472			}
473		}
474	})
475}
476
477func FuzzParseGetImageReply(f *testing.F) {
478	f.Add(make([]byte, 32))
479	f.Fuzz(func(t *testing.T, raw []byte) {
480		r, ok := ParseGetImageReply(raw)
481		if !ok {
482			return
483		}
484		if len(r.Raw()) != len(raw) {
485			t.Fatal("Raw must return the parsed bytes")
486		}
487		_ = r.Depth()
488		_ = r.Visual()
489		_ = len(r.Data())
490	})
491}
492
493func FuzzParseListInstalledColormapsReply(f *testing.F) {
494	f.Add(make([]byte, 32))
495	f.Fuzz(func(t *testing.T, raw []byte) {
496		r, ok := ParseListInstalledColormapsReply(raw)
497		if !ok {
498			return
499		}
500		if len(r.Raw()) != len(raw) {
501			t.Fatal("Raw must return the parsed bytes")
502		}
503		_ = r.CmapsLen()
504		{
505			l0 := r.Cmaps()
506			for i := 0; i < l0.Len(); i++ {
507				_ = l0.At(i)
508			}
509		}
510	})
511}
512
513func FuzzParseAllocColorReply(f *testing.F) {
514	f.Add(make([]byte, 32))
515	f.Fuzz(func(t *testing.T, raw []byte) {
516		r, ok := ParseAllocColorReply(raw)
517		if !ok {
518			if len(raw) >= 32 {
519				t.Fatal("rejected a complete fixed-size reply")
520			}
521			return
522		}
523		if len(r.Raw()) != len(raw) {
524			t.Fatal("Raw must return the parsed bytes")
525		}
526		_ = r.Red()
527		_ = r.Green()
528		_ = r.Blue()
529		_ = r.Pixel()
530	})
531}
532
533func FuzzParseAllocNamedColorReply(f *testing.F) {
534	f.Add(make([]byte, 32))
535	f.Fuzz(func(t *testing.T, raw []byte) {
536		r, ok := ParseAllocNamedColorReply(raw)
537		if !ok {
538			if len(raw) >= 32 {
539				t.Fatal("rejected a complete fixed-size reply")
540			}
541			return
542		}
543		if len(r.Raw()) != len(raw) {
544			t.Fatal("Raw must return the parsed bytes")
545		}
546		_ = r.Pixel()
547		_ = r.ExactRed()
548		_ = r.ExactGreen()
549		_ = r.ExactBlue()
550		_ = r.VisualRed()
551		_ = r.VisualGreen()
552		_ = r.VisualBlue()
553	})
554}
555
556func FuzzParseAllocColorCellsReply(f *testing.F) {
557	f.Add(make([]byte, 32))
558	f.Fuzz(func(t *testing.T, raw []byte) {
559		r, ok := ParseAllocColorCellsReply(raw)
560		if !ok {
561			return
562		}
563		if len(r.Raw()) != len(raw) {
564			t.Fatal("Raw must return the parsed bytes")
565		}
566		_ = r.PixelsLen()
567		_ = r.MasksLen()
568		{
569			l0 := r.Pixels()
570			for i := 0; i < l0.Len(); i++ {
571				_ = l0.At(i)
572			}
573		}
574		{
575			l0 := r.Masks()
576			for i := 0; i < l0.Len(); i++ {
577				_ = l0.At(i)
578			}
579		}
580	})
581}
582
583func FuzzParseAllocColorPlanesReply(f *testing.F) {
584	f.Add(make([]byte, 32))
585	f.Fuzz(func(t *testing.T, raw []byte) {
586		r, ok := ParseAllocColorPlanesReply(raw)
587		if !ok {
588			return
589		}
590		if len(r.Raw()) != len(raw) {
591			t.Fatal("Raw must return the parsed bytes")
592		}
593		_ = r.PixelsLen()
594		_ = r.RedMask()
595		_ = r.GreenMask()
596		_ = r.BlueMask()
597		{
598			l0 := r.Pixels()
599			for i := 0; i < l0.Len(); i++ {
600				_ = l0.At(i)
601			}
602		}
603	})
604}
605
606func FuzzParseQueryColorsReply(f *testing.F) {
607	f.Add(make([]byte, 32))
608	f.Fuzz(func(t *testing.T, raw []byte) {
609		r, ok := ParseQueryColorsReply(raw)
610		if !ok {
611			return
612		}
613		if len(r.Raw()) != len(raw) {
614			t.Fatal("Raw must return the parsed bytes")
615		}
616		_ = r.ColorsLen()
617		{
618			l0 := r.Colors()
619			for i := 0; i < l0.Len(); i++ {
620				_ = l0.At(i)
621			}
622		}
623	})
624}
625
626func FuzzParseLookupColorReply(f *testing.F) {
627	f.Add(make([]byte, 32))
628	f.Fuzz(func(t *testing.T, raw []byte) {
629		r, ok := ParseLookupColorReply(raw)
630		if !ok {
631			if len(raw) >= 32 {
632				t.Fatal("rejected a complete fixed-size reply")
633			}
634			return
635		}
636		if len(r.Raw()) != len(raw) {
637			t.Fatal("Raw must return the parsed bytes")
638		}
639		_ = r.ExactRed()
640		_ = r.ExactGreen()
641		_ = r.ExactBlue()
642		_ = r.VisualRed()
643		_ = r.VisualGreen()
644		_ = r.VisualBlue()
645	})
646}
647
648func FuzzParseQueryBestSizeReply(f *testing.F) {
649	f.Add(make([]byte, 32))
650	f.Fuzz(func(t *testing.T, raw []byte) {
651		r, ok := ParseQueryBestSizeReply(raw)
652		if !ok {
653			if len(raw) >= 32 {
654				t.Fatal("rejected a complete fixed-size reply")
655			}
656			return
657		}
658		if len(r.Raw()) != len(raw) {
659			t.Fatal("Raw must return the parsed bytes")
660		}
661		_ = r.Width()
662		_ = r.Height()
663	})
664}
665
666func FuzzParseQueryExtensionReply(f *testing.F) {
667	f.Add(make([]byte, 32))
668	if raw, err := xtest.LoadHex("../testdata/golden/xproto/QueryExtension.reply.hex"); err != nil {
669		f.Fatal(err)
670	} else {
671		f.Add(raw)
672	}
673	f.Fuzz(func(t *testing.T, raw []byte) {
674		r, ok := ParseQueryExtensionReply(raw)
675		if !ok {
676			if len(raw) >= 32 {
677				t.Fatal("rejected a complete fixed-size reply")
678			}
679			return
680		}
681		if len(r.Raw()) != len(raw) {
682			t.Fatal("Raw must return the parsed bytes")
683		}
684		_ = r.Present()
685		_ = r.MajorOpcode()
686		_ = r.FirstEvent()
687		_ = r.FirstError()
688	})
689}
690
691func FuzzParseListExtensionsReply(f *testing.F) {
692	f.Add(make([]byte, 32))
693	if raw, err := xtest.LoadHex("../testdata/golden/xproto/ListExtensions.reply.hex"); err != nil {
694		f.Fatal(err)
695	} else {
696		f.Add(raw)
697	}
698	f.Fuzz(func(t *testing.T, raw []byte) {
699		r, ok := ParseListExtensionsReply(raw)
700		if !ok {
701			return
702		}
703		if len(r.Raw()) != len(raw) {
704			t.Fatal("Raw must return the parsed bytes")
705		}
706		_ = r.NamesLen()
707		{
708			it0 := r.Names()
709			for it0.Next() {
710				_ = it0.Value().NameLen()
711				_ = len(it0.Value().Name())
712			}
713			if it0.Err() {
714				t.Fatal("iterator error after successful Parse")
715			}
716		}
717	})
718}
719
720func FuzzParseGetKeyboardMappingReply(f *testing.F) {
721	f.Add(make([]byte, 32))
722	f.Fuzz(func(t *testing.T, raw []byte) {
723		r, ok := ParseGetKeyboardMappingReply(raw)
724		if !ok {
725			return
726		}
727		if len(r.Raw()) != len(raw) {
728			t.Fatal("Raw must return the parsed bytes")
729		}
730		_ = r.KeysymsPerKeycode()
731		{
732			l0 := r.Keysyms()
733			for i := 0; i < l0.Len(); i++ {
734				_ = l0.At(i)
735			}
736		}
737	})
738}
739
740func FuzzParseGetKeyboardControlReply(f *testing.F) {
741	f.Add(make([]byte, 52))
742	f.Fuzz(func(t *testing.T, raw []byte) {
743		r, ok := ParseGetKeyboardControlReply(raw)
744		if !ok {
745			if len(raw) >= 52 {
746				t.Fatal("rejected a complete fixed-size reply")
747			}
748			return
749		}
750		if len(r.Raw()) != len(raw) {
751			t.Fatal("Raw must return the parsed bytes")
752		}
753		_ = r.GlobalAutoRepeat()
754		_ = r.LedMask()
755		_ = r.KeyClickPercent()
756		_ = r.BellPercent()
757		_ = r.BellPitch()
758		_ = r.BellDuration()
759		_ = len(r.AutoRepeats())
760	})
761}
762
763func FuzzParseGetPointerControlReply(f *testing.F) {
764	f.Add(make([]byte, 32))
765	f.Fuzz(func(t *testing.T, raw []byte) {
766		r, ok := ParseGetPointerControlReply(raw)
767		if !ok {
768			if len(raw) >= 32 {
769				t.Fatal("rejected a complete fixed-size reply")
770			}
771			return
772		}
773		if len(r.Raw()) != len(raw) {
774			t.Fatal("Raw must return the parsed bytes")
775		}
776		_ = r.AccelerationNumerator()
777		_ = r.AccelerationDenominator()
778		_ = r.Threshold()
779	})
780}
781
782func FuzzParseGetScreenSaverReply(f *testing.F) {
783	f.Add(make([]byte, 32))
784	f.Fuzz(func(t *testing.T, raw []byte) {
785		r, ok := ParseGetScreenSaverReply(raw)
786		if !ok {
787			if len(raw) >= 32 {
788				t.Fatal("rejected a complete fixed-size reply")
789			}
790			return
791		}
792		if len(r.Raw()) != len(raw) {
793			t.Fatal("Raw must return the parsed bytes")
794		}
795		_ = r.Timeout()
796		_ = r.Interval()
797		_ = r.PreferBlanking()
798		_ = r.AllowExposures()
799	})
800}
801
802func FuzzParseListHostsReply(f *testing.F) {
803	f.Add(make([]byte, 32))
804	f.Fuzz(func(t *testing.T, raw []byte) {
805		r, ok := ParseListHostsReply(raw)
806		if !ok {
807			return
808		}
809		if len(r.Raw()) != len(raw) {
810			t.Fatal("Raw must return the parsed bytes")
811		}
812		_ = r.Mode()
813		_ = r.HostsLen()
814		{
815			it0 := r.Hosts()
816			for it0.Next() {
817				_ = it0.Value().Family()
818				_ = it0.Value().AddressLen()
819				_ = len(it0.Value().Address())
820			}
821			if it0.Err() {
822				t.Fatal("iterator error after successful Parse")
823			}
824		}
825	})
826}
827
828func FuzzParseSetPointerMappingReply(f *testing.F) {
829	f.Add(make([]byte, 32))
830	f.Fuzz(func(t *testing.T, raw []byte) {
831		r, ok := ParseSetPointerMappingReply(raw)
832		if !ok {
833			if len(raw) >= 32 {
834				t.Fatal("rejected a complete fixed-size reply")
835			}
836			return
837		}
838		if len(r.Raw()) != len(raw) {
839			t.Fatal("Raw must return the parsed bytes")
840		}
841		_ = r.Status()
842	})
843}
844
845func FuzzParseGetPointerMappingReply(f *testing.F) {
846	f.Add(make([]byte, 32))
847	f.Fuzz(func(t *testing.T, raw []byte) {
848		r, ok := ParseGetPointerMappingReply(raw)
849		if !ok {
850			return
851		}
852		if len(r.Raw()) != len(raw) {
853			t.Fatal("Raw must return the parsed bytes")
854		}
855		_ = r.MapLen()
856		_ = len(r.Map())
857	})
858}
859
860func FuzzParseSetModifierMappingReply(f *testing.F) {
861	f.Add(make([]byte, 32))
862	f.Fuzz(func(t *testing.T, raw []byte) {
863		r, ok := ParseSetModifierMappingReply(raw)
864		if !ok {
865			if len(raw) >= 32 {
866				t.Fatal("rejected a complete fixed-size reply")
867			}
868			return
869		}
870		if len(r.Raw()) != len(raw) {
871			t.Fatal("Raw must return the parsed bytes")
872		}
873		_ = r.Status()
874	})
875}
876
877func FuzzParseGetModifierMappingReply(f *testing.F) {
878	f.Add(make([]byte, 32))
879	f.Fuzz(func(t *testing.T, raw []byte) {
880		r, ok := ParseGetModifierMappingReply(raw)
881		if !ok {
882			return
883		}
884		if len(r.Raw()) != len(raw) {
885			t.Fatal("Raw must return the parsed bytes")
886		}
887		_ = r.KeycodesPerModifier()
888		{
889			l0 := r.Keycodes()
890			for i := 0; i < l0.Len(); i++ {
891				_ = l0.At(i)
892			}
893		}
894	})
895}

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 1

↑↓ moveenter openesc close