aboutsummaryrefslogtreecommitdiff
path: root/test/HostlistTest.cpp
blob: 31ae11ccd8a4b26d73e3f376bdb0d9a7f8f43a02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include "HostlistTest.h"

void HostlistTest::initTestCase()
{
    rules = parse(":/autotests/data/hostlist.txt");
}

void HostlistTest::parse_ruleCount()
{
    QVERIFY(rules.count() == 3);
}

void HostlistTest::parse_blockSomehost()
{
    QVERIFY(rules.contains("somehost.org"));
    QVERIFY(rules.value("somehost.org").isBlocking);
}

void HostlistTest::parse_blockHost2()
{
    QVERIFY(rules.contains("host2.org"));
    QVERIFY(rules.value("host2.org").isBlocking);
}

QTEST_MAIN(HostlistTest)