Changeset View
Changeset View
Standalone View
Standalone View
autotests/src/kateview_test.cpp
Show First 20 Lines • Show All 91 Lines • ▼ Show 20 Line(s) | 271 | { | |||
---|---|---|---|---|---|
288 | view->shiftDown(); | 288 | view->shiftDown(); | ||
289 | view->killLine(); | 289 | view->killLine(); | ||
290 | 290 | | |||
291 | QCOMPARE(doc.text(), QLatin1String("foo\nxxx\n")); | 291 | QCOMPARE(doc.text(), QLatin1String("foo\nxxx\n")); | ||
292 | } | 292 | } | ||
293 | 293 | | |||
294 | void KateViewTest::testScrollPastEndOfDocument() | 294 | void KateViewTest::testScrollPastEndOfDocument() | ||
295 | { | 295 | { | ||
296 | #if 0 // bug still exists, see bug 306745 | 296 | // bug 306745 | ||
297 | KTextEditor::DocumentPrivate doc; | 297 | KTextEditor::DocumentPrivate doc; | ||
298 | doc.setText(QStringLiteral("0000000000\n" | 298 | doc.setText(QStringLiteral("0000000000\n" | ||
299 | "1111111111\n" | 299 | "1111111111\n" | ||
300 | "2222222222\n" | 300 | "2222222222\n" | ||
301 | "3333333333\n" | 301 | "3333333333\n" | ||
302 | "4444444444")); | 302 | "4444444444")); | ||
303 | QCOMPARE(doc.lines(), 5); | 303 | QCOMPARE(doc.lines(), 5); | ||
304 | 304 | | |||
Show All 13 Lines | |||||
318 | view->scrollDown(); | 318 | view->scrollDown(); | ||
319 | view->scrollDown(); | 319 | view->scrollDown(); | ||
320 | view->scrollDown(); | 320 | view->scrollDown(); | ||
321 | // at this point, only lines 3333333333 and 4444444444 are visible. | 321 | // at this point, only lines 3333333333 and 4444444444 are visible. | ||
322 | view->down(); | 322 | view->down(); | ||
323 | QCOMPARE(view->cursorPosition(), KTextEditor::Cursor(4, 5)); | 323 | QCOMPARE(view->cursorPosition(), KTextEditor::Cursor(4, 5)); | ||
324 | // verify, that only lines 3333333333 and 4444444444 are still visible. | 324 | // verify, that only lines 3333333333 and 4444444444 are still visible. | ||
325 | QCOMPARE(view->firstDisplayedLineInternal(KTextEditor::View::RealLine), 3); | 325 | QCOMPARE(view->firstDisplayedLineInternal(KTextEditor::View::RealLine), 3); | ||
326 | #endif | | |||
327 | } | 326 | } | ||
328 | 327 | | |||
329 | void KateViewTest::testFoldFirstLine() | 328 | void KateViewTest::testFoldFirstLine() | ||
330 | { | 329 | { | ||
331 | QTemporaryFile file("XXXXXX.cpp"); | 330 | QTemporaryFile file("XXXXXX.cpp"); | ||
332 | file.open(); | 331 | file.open(); | ||
333 | QTextStream stream(&file); | 332 | QTextStream stream(&file); | ||
334 | stream << "/**\n" | 333 | stream << "/**\n" | ||
▲ Show 20 Lines • Show All 91 Lines • Show Last 20 Lines |