MCPcopy
hub / github.com/c-bata/go-prompt / TestDocument_CurrentLineAfterCursor

Function TestDocument_CurrentLineAfterCursor

document_test.go:1044–1054  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1042}
1043
1044func TestDocument_CurrentLineAfterCursor(t *testing.T) {
1045 d := &Document{
1046 Text: "line 1\nline 2\nline 3\nline 4\n",
1047 cursorPosition: len("line 1\n" + "lin"),
1048 }
1049 ac := d.CurrentLineAfterCursor()
1050 ex := "e 2"
1051 if ac != ex {
1052 t.Errorf("Should be %#v, got %#v", ex, ac)
1053 }
1054}
1055
1056func TestDocument_CurrentLine(t *testing.T) {
1057 d := &Document{

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…