MCPcopy
hub / github.com/gdamore/tcell / TestKeyRepeatCursor

Function TestKeyRepeatCursor

vt/tests/key_test.go:364–381  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

362}
363
364func TestKeyRepeatCursor(t *testing.T) {
365 term := vt.NewMockTerm()
366 defer MustClose(t, term)
367
368 MustStart(t, term)
369
370 // Keep the initial repeat quick, but make later repeats very slow so the test
371 // does not depend on coarse timer behavior.
372 term.SetRepeat(time.Millisecond*50, time.Second)
373
374 term.KeyPress(vt.KeyRight)
375 time.Sleep(100 * time.Millisecond)
376 term.KeyPress(vt.KeyRight)
377 term.KeyRelease(vt.KeyRight)
378 term.KeyRelease(vt.KeyRight)
379
380 CheckRead(t, term, "\x1b[C\x1b[C")
381}
382
383func TestKeyWin32(t *testing.T) {
384 // Win32 input mode is ESC [ Vk ; Sc ; Uc ; Kd ; Cs ; Rc _

Callers

nothing calls this directly

Calls 7

SetRepeatMethod · 0.95
KeyPressMethod · 0.95
KeyReleaseMethod · 0.95
NewMockTermFunction · 0.92
MustCloseFunction · 0.85
MustStartFunction · 0.85
CheckReadFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…