Commit a897a3b0 authored by Lukas Holecek's avatar Lukas Holecek Committed by hjk
Browse files

fakevim: Added tests



Change-Id: I6b6e54817bf41402f5575142b1adb9362c717439
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent a32e243e
......@@ -16,3 +16,7 @@ HEADERS += fakevimactions.h \
fakevimhandler.h \
fakevimplugin.h
FORMS += fakevimoptions.ui
equals(TEST, 1) {
SOURCES += fakevim_test.cpp
}
This diff is collapsed.
......@@ -78,6 +78,8 @@
#include <cpptools/cpptoolsconstants.h>
#include <extensionsystem/pluginmanager.h>
#include <QAbstractTableModel>
#include <QDebug>
#include <QFile>
......@@ -991,7 +993,10 @@ bool FakeVimPluginPrivate::initialize()
this, SLOT(handleDelayedQuit(bool,Core::IEditor*)), Qt::QueuedConnection);
connect(this, SIGNAL(delayedQuitAllRequested(bool)),
this, SLOT(handleDelayedQuitAll(bool)), Qt::QueuedConnection);
maybeReadVimRc();
// Vimrc can break test so don't source it if running tests.
if (!ExtensionSystem::PluginManager::runningTests())
maybeReadVimRc();
// << "MODE: " << theFakeVimSetting(ConfigUseFakeVim)->value();
return true;
......
......@@ -57,6 +57,23 @@ private:
private:
friend class FakeVimPluginPrivate;
FakeVimPluginPrivate *d;
#ifdef WITH_TESTS
private slots:
void test_vim_movement();
void test_vim_fFtT();
void test_vim_delete();
void test_vim_delete_inner_word();
void test_vim_delete_a_word();
void test_vim_change_a_word();
void test_vim_block_selection();
void test_vim_repeat();
void test_vim_search();
void test_vim_indent();
void test_vim_marks();
void test_vim_copy_paste();
void test_vim_undo_redo();
#endif
};
} // namespace Internal
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment