Skip to content

Commit

Permalink
Move "normal" (older) zim files under the name "withns".
Browse files Browse the repository at this point in the history
"normal" is normal only for a time. They will become old with time.
It is better to name them by their characteristics.
  • Loading branch information
mgautierfr committed Apr 19, 2021
1 parent 8f18f3c commit 59fea7c
Show file tree
Hide file tree
Showing 26 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions test/archive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ TEST(ZimArchive, validate)

for(auto& testfile: getDataFilePath("invalid.outofbounds_titleptrpos.zim")) {
std::string expected;
if (testfile.category == "normal") {
if (testfile.category == "withns") {
expected = "Title index table outside (or not fully inside) ZIM file.\n";
} else {
expected = "Full Title index table outside (or not fully inside) ZIM file.\n";
Expand Down Expand Up @@ -286,7 +286,7 @@ TEST(ZimArchive, validate)

for(auto& testfile: getDataFilePath("invalid.nonsorted_dirent_table.zim")) {
std::string expected;
if (testfile.category == "normal") {
if (testfile.category == "withns") {
expected = "Dirent table is not properly sorted:\n"
" #0: A/main.html\n"
" #1: -/favicon\n";
Expand All @@ -310,7 +310,7 @@ TEST(ZimArchive, validate)

for(auto& testfile: getDataFilePath("invalid.bad_mimetype_in_dirent.zim")) {
std::string expected;
if (testfile.category == "normal") {
if (testfile.category == "withns") {
expected = "Entry M/Language has invalid MIME-type value 1234.\n";
} else {
expected = "Entry M/Scraper has invalid MIME-type value 1234.\n";
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion test/find.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ TEST(FindTests, ByTitle)
// By Path
TEST(FindTests, ByPath)
{
for(auto& testfile:getDataFilePath("wikibooks_be_all_nopic_2017-02.zim", "normal")) {
for(auto& testfile:getDataFilePath("wikibooks_be_all_nopic_2017-02.zim", "withns")) {
zim::Archive archive (testfile.path);

auto range0 = archive.findByPath("A/Main_Page.html");
Expand Down
10 changes: 5 additions & 5 deletions test/iterator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ TEST(ClusterIteratorTest, getEntryByClusterOrder)
117, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108 };

for(auto& testfile:getDataFilePath("wikibooks_be_all_nopic_2017-02.zim", "normal")) {
for(auto& testfile:getDataFilePath("wikibooks_be_all_nopic_2017-02.zim", "withns")) {
zim::Archive archive (testfile.path);

auto nbEntries = archive.getEntryCount();
Expand All @@ -55,7 +55,7 @@ TEST(ClusterIteratorTest, getEntryByClusterOrder)

TEST(getEntry, indexOutOfRange)
{
for(auto& testfile:getDataFilePath("wikibooks_be_all_nopic_2017-02.zim", "normal")) {
for(auto& testfile:getDataFilePath("wikibooks_be_all_nopic_2017-02.zim", "withns")) {
zim::Archive archive (testfile.path);

auto nbEntries = archive.getEntryCount();
Expand All @@ -82,7 +82,7 @@ TEST(IteratorTests, begin)
117, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108 };

for(auto& testfile:getDataFilePath("wikibooks_be_all_nopic_2017-02.zim", "normal")) {
for(auto& testfile:getDataFilePath("wikibooks_be_all_nopic_2017-02.zim", "withns")) {
zim::Archive archive (testfile.path);

int i = 0;
Expand All @@ -99,7 +99,7 @@ TEST(IteratorTests, beginByTitle)
{
std::vector<zim::entry_index_type> expected = { 0, 1, 2, 3, 4, 5, 7, 8, 9, 10};

for(auto& testfile:getDataFilePath("wikibooks_be_all_nopic_2017-02.zim", "normal")) {
for(auto& testfile:getDataFilePath("wikibooks_be_all_nopic_2017-02.zim", "withns")) {
zim::Archive archive (testfile.path);

auto it = archive.iterByTitle().begin();
Expand All @@ -120,7 +120,7 @@ TEST(IteratorTests, beginByPath)
{
std::vector<zim::entry_index_type> expected = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9};

for(auto& testfile:getDataFilePath("wikibooks_be_all_nopic_2017-02.zim", "normal")) {
for(auto& testfile:getDataFilePath("wikibooks_be_all_nopic_2017-02.zim", "withns")) {
zim::Archive archive (testfile.path);

auto it = archive.iterByPath().begin();
Expand Down
2 changes: 1 addition & 1 deletion test/tools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ const std::vector<TestFile> getDataFilePath(const std::string& filename, const s
// We don't have dirent.h in windows.
// If we move to test data out of the repository, we will need a way to discover the data.
// Use a static list of categories for now.
for (auto& category: {"normal", "nons"}) {
for (auto& category: {"withns", "nons"}) {
filePaths.emplace_back(dataDirPath, category, filename);
}
#else
Expand Down

0 comments on commit 59fea7c

Please sign in to comment.