diff --git a/src/plugins/fakevim/fakevim_test.cpp b/src/plugins/fakevim/fakevim_test.cpp index 6d1dd74b3ca..c81a40a2280 100644 --- a/src/plugins/fakevim/fakevim_test.cpp +++ b/src/plugins/fakevim/fakevim_test.cpp @@ -10,6 +10,8 @@ #include #include +#include +#include #include #include @@ -346,7 +348,10 @@ struct FakeVimTester::TestData void doCommand(const QString &cmd) { handler->handleCommand(cmd); } void doCommand(const char *cmd) { doCommand(_(cmd)); } - void doKeys(const QString &keys) { handler->handleInput(keys); } + void doKeys(const QString &keys) { + handler->handleInput(keys); + QTRY_VERIFY(editor()->textDocument()->syntaxHighlighterRunner()->syntaxInfoUpdated()); + } void doKeys(const char *keys) { doKeys(_(keys)); } void setText(const char *text) @@ -359,6 +364,7 @@ struct FakeVimTester::TestData else i = 0; editor()->document()->setPlainText(_(str)); + QTRY_VERIFY(editor()->textDocument()->syntaxHighlighterRunner()->syntaxInfoUpdated()); setPosition(i); QCOMPARE(position(), i); } @@ -369,6 +375,7 @@ struct FakeVimTester::TestData QTextCursor tc = editor()->textCursor(); tc.insertText(_(text)); editor()->setTextCursor(tc); + QTRY_VERIFY(editor()->textDocument()->syntaxHighlighterRunner()->syntaxInfoUpdated()); } // Simulate external position change. @@ -2988,6 +2995,7 @@ void FakeVimTester::test_vim_code_folding() // delete folded lined if deleting to the end of the first folding line data.doKeys("zMgg"); + //QTRY_COMPARE(data.lines(), lines - 8); QCOMPARE(data.lines(), lines - 8); KEYS("wwd$", "int main" N ""); @@ -5052,3 +5060,4 @@ void FakeVimTester::test_vim_qtcreator() } // FakeVim::Internal #include "fakevim_test.moc" +