additional tests for loading v2 torrents with empty files
This commit is contained in:
5
Makefile
5
Makefile
@ -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 \
|
||||
|
@ -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
|
||||
|
BIN
test/test_torrents/empty-files-1.torrent
Normal file
BIN
test/test_torrents/empty-files-1.torrent
Normal file
Binary file not shown.
BIN
test/test_torrents/empty-files-2.torrent
Normal file
BIN
test/test_torrents/empty-files-2.torrent
Normal file
Binary file not shown.
BIN
test/test_torrents/empty-files-3.torrent
Normal file
BIN
test/test_torrents/empty-files-3.torrent
Normal file
Binary file not shown.
BIN
test/test_torrents/empty-files-4.torrent
Normal file
BIN
test/test_torrents/empty-files-4.torrent
Normal file
Binary file not shown.
BIN
test/test_torrents/empty-files-5.torrent
Normal file
BIN
test/test_torrents/empty-files-5.torrent
Normal file
Binary file not shown.
Reference in New Issue
Block a user