diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2009-03-09 15:10:26 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2009-03-09 15:10:26 +0000 |
| commit | e2704bd823e44000b81e42fc05b58b8d0bc9ddda (patch) | |
| tree | 4f9a5a0299521877e03bff090bdbc80ba43486c3 /test/FileEntryTest.cc | |
| parent | ed6851636f38a1959186b92b1c619c4706ad4cca (diff) | |
2009-03-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
FileEntry::getPath() contains store(top level) directory to
simplify path handling operation. In the previous
implementation, store directory is concatenated to
FileEntry::getPath() in DownloadContext.
* src/BtDependency.cc
* src/BtPostDownloadHandler.cc
* src/CopyDiskAdaptor.cc
* src/DefaultBtContext.cc
* src/DirectDiskAdaptor.cc
* src/FileEntry.cc
* src/FileEntry.h
* src/FtpNegotiationCommand.cc
* src/HttpResponse.cc
* src/HttpResponseCommand.cc
* src/Metalink2RequestGroup.cc
* src/MultiDiskAdaptor.cc
* src/MultiDiskAdaptor.h
* src/MultiFileAllocationIterator.cc
* src/RequestGroup.cc
* src/SingleFileDownloadContext.cc
* src/SingleFileDownloadContext.h
* src/download_helper.cc
* test/BtDependencyTest.cc
* test/CopyDiskAdaptorTest.cc
* test/DefaultBtContextTest.cc
* test/DefaultBtProgressInfoFileTest.cc
* test/DirectDiskAdaptorTest.cc
* test/DownloadHelperTest.cc
* test/FileEntryTest.cc
* test/MultiDiskAdaptorTest.cc
* test/MultiFileAllocationIteratorTest.cc
* test/RequestGroupTest.cc
* test/SingleFileDownloadContextTest.cc
Diffstat (limited to 'test/FileEntryTest.cc')
| -rw-r--r-- | test/FileEntryTest.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/test/FileEntryTest.cc b/test/FileEntryTest.cc index 5b6465bc..5c3f70f6 100644 --- a/test/FileEntryTest.cc +++ b/test/FileEntryTest.cc @@ -19,17 +19,16 @@ CPPUNIT_TEST_SUITE_REGISTRATION( FileEntryTest ); void FileEntryTest::testSetupDir() { - std::string topDir = "/tmp"; - std::string dir = "aria2-FileEntryTest-testSetupDir"; + std::string dir = "/tmp/aria2-FileEntryTest-testSetupDir"; std::string filename = "filename"; - std::string path = topDir+"/"+dir+"/"+filename; - File d(topDir+"/"+dir); + std::string path = dir+"/"+filename; + File d(dir); if(d.exists()) { CPPUNIT_ASSERT(d.remove()); } CPPUNIT_ASSERT(!d.exists()); - FileEntry fileEntry(dir+"/"+filename, 0, 0); - fileEntry.setupDir(topDir); + FileEntry fileEntry(path, 0, 0); + fileEntry.setupDir(); CPPUNIT_ASSERT(d.isDir()); File f(path); CPPUNIT_ASSERT(!f.exists()); |
