Fixed getting url bug.

Signed-off-by: Viktor Govako <viktor.govako@gmail.com>
This commit is contained in:
Viktor Govako
2022-09-07 00:44:48 +03:00
committed by zyphlar
parent 623c4ed9fe
commit 6d6140ee33
3 changed files with 31 additions and 34 deletions

View File

@@ -113,8 +113,10 @@ public:
StringUtf8Multilang str;
std::string const badUrl = "https://en.wikipedia.org/wiki/Not_exists";
auto const path = DescriptionsCollector::MakePathForWikipedia(m_wikiDir, badUrl);
descriptions::LangMeta meta;
TEST_EQUAL(collector.FindPageAndFill(path, meta), -1, ());
TEST_EQUAL(collector.FindPageAndFill(path, meta), 0, ());
TEST(meta.empty(), ());
}
}