aboutsummaryrefslogtreecommitdiff
path: root/staging/hostlist/test/filterlist.cpp
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2020-04-20 13:29:06 +0300
committerAqua-sama <aqua@iserlohn-fortress.net>2020-04-21 20:14:58 +0300
commit8d484d153dd054be89be51b7b4e9815450c0065a (patch)
tree44a4c1045969909197312003957611f90d9be582 /staging/hostlist/test/filterlist.cpp
parentAdd plugin loading code to smolblok (diff)
downloadsmolbote-8d484d153dd054be89be51b7b4e9815450c0065a.tar.xz
Move staging/hostlist to subprojects/plugin_hostlist
Diffstat (limited to 'staging/hostlist/test/filterlist.cpp')
-rw-r--r--staging/hostlist/test/filterlist.cpp29
1 files changed, 0 insertions, 29 deletions
diff --git a/staging/hostlist/test/filterlist.cpp b/staging/hostlist/test/filterlist.cpp
deleted file mode 100644
index fb71068..0000000
--- a/staging/hostlist/test/filterlist.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-#define CATCH_CONFIG_MAIN
-#include "filterlist.hpp"
-#include <QFile>
-#include <catch2/catch.hpp>
-
-using namespace Hostlist;
-
-TEST_CASE("Hostlist")
-{
- Filterlist list;
-
- const QString filename(qgetenv("HOSTLIST_TXT"));
- REQUIRE(!filename.isEmpty());
-
- QFile f(filename);
- REQUIRE(f.open(QIODevice::ReadOnly | QIODevice::Text));
-
- REQUIRE(list.load(f));
- f.close();
-
- REQUIRE(list.count() == 4);
-
- REQUIRE(list.findMatch("blockeddomain.first"));
- REQUIRE(list.findMatch("blockeddomain.second"));
-
- REQUIRE(list.findMatch("localhost.localdomain"));
-
- REQUIRE(!list.findMatch("other.domain"));
-}