diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2020-05-31 21:53:52 +0300 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2020-05-31 21:53:52 +0300 |
commit | 737d688e5b173ef5155db3e4fc9e8debf9b33a11 (patch) | |
tree | 3fe6cd4aade797fc0c3b18d458834befd43a91cf /plugins/smolblok_hostlist/test/plugin.cpp | |
parent | staging: smolblok (diff) | |
download | smolbote-737d688e5b173ef5155db3e4fc9e8debf9b33a11.tar.xz |
enable smolblokstaging-smolblok
Build both HostlistFilter and AdblockFitler plugins by default.
Diffstat (limited to 'plugins/smolblok_hostlist/test/plugin.cpp')
-rw-r--r-- | plugins/smolblok_hostlist/test/plugin.cpp | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/plugins/smolblok_hostlist/test/plugin.cpp b/plugins/smolblok_hostlist/test/plugin.cpp deleted file mode 100644 index fad34f2..0000000 --- a/plugins/smolblok_hostlist/test/plugin.cpp +++ /dev/null @@ -1,27 +0,0 @@ -#define CATCH_CONFIG_MAIN -#include "plugin/plugin.h" -#include <QFile> -#include <catch2/catch.hpp> - -TEST_CASE("Hostlist") -{ - HostlistFilterPlugin plugin; - - const QString filename(qgetenv("HOSTLIST_TXT")); - REQUIRE(!filename.isEmpty()); - QFile f(filename); - - // shouldn't be able to load an unopened QIODevice - REQUIRE(plugin.load(f) == nullptr); - - REQUIRE(f.open(QIODevice::ReadOnly | QIODevice::Text)); - - auto *list = plugin.load(f); - REQUIRE(list != nullptr); - f.seek(0); - REQUIRE_FALSE(plugin.parse(nullptr, f)); - REQUIRE(plugin.parse(list, f)); - f.close(); - REQUIRE_FALSE(plugin.parse(list, f)); -} - |