additional tests for loading v2 torrents with empty files

This commit is contained in:
arvidn
2021-04-23 08:56:56 +02:00
committed by Arvid Norberg
parent af54589abb
commit 5b2dd0771b
7 changed files with 30 additions and 0 deletions

View File

@ -959,6 +959,11 @@ TEST_TORRENTS = \
empty_httpseed.torrent \
empty_path.torrent \
empty_path_multi.torrent \
empty-files-1.torrent \
empty-files-2.torrent \
empty-files-3.torrent \
empty-files-4.torrent \
empty-files-5.torrent \
hidden_parent_path.torrent \
httpseed.torrent \
invalid_file_size.torrent \

View File

@ -335,6 +335,31 @@ static test_torrent_t const test_torrents[] =
TEST_CHECK(ti->info_hashes().has_v2());
}
},
{ "empty-files-1.torrent", [](torrent_info const* ti) {
TEST_CHECK(ti->info_hashes().has_v1());
TEST_CHECK(ti->info_hashes().has_v2());
}
},
{ "empty-files-2.torrent", [](torrent_info const* ti) {
TEST_CHECK(ti->info_hashes().has_v1());
TEST_CHECK(ti->info_hashes().has_v2());
}
},
{ "empty-files-3.torrent", [](torrent_info const* ti) {
TEST_CHECK(ti->info_hashes().has_v1());
TEST_CHECK(ti->info_hashes().has_v2());
}
},
{ "empty-files-4.torrent", [](torrent_info const* ti) {
TEST_CHECK(ti->info_hashes().has_v1());
TEST_CHECK(ti->info_hashes().has_v2());
}
},
{ "empty-files-5.torrent", [](torrent_info const* ti) {
TEST_CHECK(ti->info_hashes().has_v1());
TEST_CHECK(ti->info_hashes().has_v2());
}
},
};
struct test_failing_torrent_t

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.