MCPcopy Create free account
hub / github.com/c-bata/go-prompt / TestDocument_LineCount

Function TestDocument_LineCount

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

Source from the content-addressed store, hash-verified

1177}
1178
1179func TestDocument_LineCount(t *testing.T) {
1180 d := &Document{
1181 Text: "line 1\nline 2\nline 3\nline 4\n",
1182 cursorPosition: len("line 1\n" + "lin"),
1183 }
1184 ac := d.LineCount()
1185 ex := 5
1186 if ac != ex {
1187 t.Errorf("Should be %#v, got %#v", ex, ac)
1188 }
1189}
1190
1191func TestDocument_TranslateIndexToPosition(t *testing.T) {
1192 d := &Document{

Callers

nothing calls this directly

Calls 1

LineCountMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…