merged fix from RC_0_16

This commit is contained in:
Arvid Norberg
2013-10-24 07:22:44 +00:00
parent af6dbc5d79
commit c94ed806db
6 changed files with 38 additions and 6 deletions

View File

@@ -125,6 +125,7 @@ int test_main()
TEST_EQUAL(extension("blah.exe"), ".exe");
TEST_EQUAL(extension("blah.foo.bar"), ".bar");
TEST_EQUAL(extension("blah.foo."), ".");
TEST_EQUAL(extension("blah.foo/bar"), "");
TEST_EQUAL(filename("blah"), "blah");
TEST_EQUAL(filename("/blah/foo/bar"), "bar");
@@ -209,6 +210,15 @@ int test_main()
replace_extension(test, "txt");
TEST_EQUAL(test, "foo.txt");
test = "_";
replace_extension(test, "txt");
TEST_EQUAL(test, "_.txt");
test = "1.2.3/_";
replace_extension(test, "txt");
TEST_EQUAL(test, "1.2.3/_.txt");
// file class
file f;
#if TORRENT_USE_UNC_PATHS || !defined WIN32

View File

@@ -71,6 +71,7 @@ test_torrent_t test_torrents[] =
{ "url_seed_multi_space.torrent" },
{ "url_seed_multi_space_nolist.torrent" },
{ "root_hash.torrent" },
{ "empty_path_multi.torrent" },
};
struct test_failing_torrent_t

View File

@@ -0,0 +1 @@
d10:created by10:libtorrent13:creation datei1359599503e4:infod5:filesld6:lengthi425e4:pathl5:abcdeeed6:lengthi3e4:pathl0:eed6:lengthi5e4:pathl0:eee4:name4:temp12:piece lengthi16384e6:pieces20:<3A><><EFBFBD><EFBFBD>&<26><>JW<4A>}<7D>A4u,<2C><><EFBFBD><EFBFBD>ee