Fix missing value in serialized pause option

This commit is contained in:
Tatsuhiro Tsujikawa 2013-03-03 13:17:49 +09:00
parent 1596e83a83
commit 910e40f128
2 changed files with 5 additions and 1 deletions

View file

@ -45,6 +45,7 @@ void SessionSerializerTest::testSave()
option->put(PREF_DIR, "/tmp");
createRequestGroupForUri(result, option, uris);
CPPUNIT_ASSERT_EQUAL((size_t)5, result.size());
result[4]->getOption()->put(PREF_PAUSE, A2_V_TRUE);
option->put(PREF_MAX_DOWNLOAD_RESULT, "10");
SharedHandle<RequestGroupMan> rgman
(new RequestGroupMan(result, 1, option.get()));
@ -116,6 +117,8 @@ void SessionSerializerTest::testSave()
std::getline(ss, line);
CPPUNIT_ASSERT_EQUAL(std::string(" dir=/tmp"), line);
std::getline(ss, line);
CPPUNIT_ASSERT_EQUAL(std::string(" pause=true"), line);
std::getline(ss, line);
CPPUNIT_ASSERT(!ss);
#endif // defined(ENABLE_BITTORRENT) && defined(ENABLE_METALINK)
}