diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2020-04-20 13:29:06 +0300 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2020-04-21 20:14:58 +0300 |
commit | 8d484d153dd054be89be51b7b4e9815450c0065a (patch) | |
tree | 44a4c1045969909197312003957611f90d9be582 /staging/hostlist/test/filterlist.cpp | |
parent | Add plugin loading code to smolblok (diff) | |
download | smolbote-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.cpp | 29 |
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")); -} |