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 /staging/adblock/test/options.cpp | |
parent | staging: smolblok (diff) | |
download | smolbote-staging-smolblok.tar.xz |
enable smolblokstaging-smolblok
Build both HostlistFilter and AdblockFitler plugins by default.
Diffstat (limited to 'staging/adblock/test/options.cpp')
-rw-r--r-- | staging/adblock/test/options.cpp | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/staging/adblock/test/options.cpp b/staging/adblock/test/options.cpp deleted file mode 100644 index 67dc143..0000000 --- a/staging/adblock/test/options.cpp +++ /dev/null @@ -1,42 +0,0 @@ -#define CATCH_CONFIG_MAIN -#include "options.h" -#include <catch2/catch.hpp> - -using namespace AdblockPlus; - -SCENARIO("parsing adblock options") -{ - Options opt; - - GIVEN("an unknown option") - { - const QString unknown = "unknown"; - THEN("the option is not parsed") - { - QStringRef unknown_ref(&unknown); - REQUIRE(!opt.parseAbp(unknown_ref)); - } - } - - GIVEN("match-case,document,~subdocument") - { - const QString options = "match-case,document,~subdocument"; - REQUIRE(opt.parseAbp(&options)); - - WHEN("match-case") - { - REQUIRE(opt.matchcase); - } - - WHEN("testing set/unset options") - { - REQUIRE(opt.matchesType(QWebEngineUrlRequestInfo::ResourceTypeMainFrame)); - REQUIRE(!opt.matchesType(QWebEngineUrlRequestInfo::ResourceTypeSubFrame)); - } - - WHEN("testing other options") - { - REQUIRE(opt.matchesType(QWebEngineUrlRequestInfo::ResourceTypeStylesheet)); - } - } -} |