diff options
Diffstat (limited to 'test/catch_rttt.cpp')
-rw-r--r-- | test/catch_rttt.cpp | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/test/catch_rttt.cpp b/test/catch_rttt.cpp index 15be3f5..7cca304 100644 --- a/test/catch_rttt.cpp +++ b/test/catch_rttt.cpp @@ -6,59 +6,36 @@ #include "rttt/config.hpp" SCENARIO("We can parse a path correctly") { + // TODO: Move this to the source specific tests auto p = rttt::parse_path("/hn/news"); REQUIRE(p.mode == rttt::list_mode::story); - REQUIRE(p.type == rttt::SiteType::HN); REQUIRE(p.name == "/hn/news"); p = rttt::parse_path("/hn/top"); REQUIRE(p.mode == rttt::list_mode::story); - REQUIRE(p.type == rttt::SiteType::HN); REQUIRE(p.basename == "/hn/top"); REQUIRE(p.name == "/hn/top"); p = rttt::parse_path("/hn/news/comments/x1"); REQUIRE(p.mode == rttt::list_mode::comment); - REQUIRE(p.type == rttt::SiteType::HN); REQUIRE(p.basename == "/hn/news"); REQUIRE(p.name == "/hn/news/comments/x1"); REQUIRE(p.id == "x1"); p = rttt::parse_path("/r/news"); REQUIRE(p.mode == rttt::list_mode::story); - REQUIRE(p.type == rttt::SiteType::Reddit); REQUIRE(p.name == "/r/news"); p = rttt::parse_path("r/news"); REQUIRE(p.mode == rttt::list_mode::story); - REQUIRE(p.type == rttt::SiteType::Reddit); REQUIRE(p.name == "/r/news"); p = rttt::parse_path("/r/news/comments/x1"); REQUIRE(p.mode == rttt::list_mode::comment); - REQUIRE(p.type == rttt::SiteType::Reddit); REQUIRE(p.name == "/r/news/comments/x1"); REQUIRE(p.basename == "/r/news"); REQUIRE(p.id == "x1"); - p = rttt::parse_path("/rss/front"); - REQUIRE(p.mode == rttt::list_mode::story); - REQUIRE(p.type == rttt::SiteType::RSS); - REQUIRE(p.name == "/rss"); - REQUIRE(p.basename == "/rss"); - - p = rttt::parse_path("/rss"); - REQUIRE(p.mode == rttt::list_mode::story); - REQUIRE(p.type == rttt::SiteType::RSS); - REQUIRE(p.name == "/rss"); - REQUIRE(p.basename == "/rss"); - - p = rttt::parse_path("/rss/x1"); - REQUIRE(p.mode == rttt::list_mode::feed); - REQUIRE(p.type == rttt::SiteType::RSS); - REQUIRE(p.name == "/rss/x1"); - REQUIRE(p.basename == "/rss"); - REQUIRE(p.id == "x1"); } SCENARIO("We can extract urls from text") { |