diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-07-09 11:48:59 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-07-09 11:48:59 +0000 |
| commit | f285f66ac8a95f175aaedf16783bb62f9821a8fc (patch) | |
| tree | 89e4a07ba7107bcc453c4e0bdbd1de1b50b6b102 /test/FtpConnectionTest.cc | |
| parent | be423e2c77bba5a88013e285925034a08d31bfc7 (diff) | |
2010-07-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Send each CWD component of FTP URI in separate CWD command as
described in RFC1738.
* src/FtpConnection.cc
* src/FtpConnection.h
* src/FtpInitiateConnectionCommand.cc
* src/FtpNegotiationCommand.cc
* src/FtpNegotiationCommand.h
* test/FtpConnectionTest.cc
Diffstat (limited to 'test/FtpConnectionTest.cc')
| -rw-r--r-- | test/FtpConnectionTest.cc | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/test/FtpConnectionTest.cc b/test/FtpConnectionTest.cc index f175f091..8390c461 100644 --- a/test/FtpConnectionTest.cc +++ b/test/FtpConnectionTest.cc @@ -29,8 +29,6 @@ class FtpConnectionTest:public CppUnit::TestFixture { CPPUNIT_TEST(testReceivePwdResponse_unquotedResponse); CPPUNIT_TEST(testReceivePwdResponse_badStatus); CPPUNIT_TEST(testSendCwd); - CPPUNIT_TEST(testSendCwd_baseWorkingDir); - CPPUNIT_TEST(testSendCwd_absDir); CPPUNIT_TEST(testSendSize); CPPUNIT_TEST(testReceiveSizeResponse); CPPUNIT_TEST(testSendRetr); @@ -84,8 +82,6 @@ public: void testReceivePwdResponse_unquotedResponse(); void testReceivePwdResponse_badStatus(); void testSendCwd(); - void testSendCwd_baseWorkingDir(); - void testSendCwd_absDir(); void testSendSize(); void testReceiveSizeResponse(); void testSendRetr(); @@ -266,7 +262,7 @@ void FtpConnectionTest::testReceivePwdResponse_badStatus() void FtpConnectionTest::testSendCwd() { - ftp_->sendCwd(); + ftp_->sendCwd("%2Fdir%20sp"); char data[32]; size_t len = sizeof(data); serverSocket_->readData(data, len); @@ -274,29 +270,6 @@ void FtpConnectionTest::testSendCwd() CPPUNIT_ASSERT_EQUAL(std::string("CWD /dir sp\r\n"), std::string(data)); } -void FtpConnectionTest::testSendCwd_baseWorkingDir() -{ - ftp_->setBaseWorkingDir("/base"); - ftp_->sendCwd(); - char data[32]; - size_t len = sizeof(data); - serverSocket_->readData(data, len); - data[len] = '\0'; - CPPUNIT_ASSERT_EQUAL(std::string("CWD /base/dir sp\r\n"), std::string(data)); -} - -void FtpConnectionTest::testSendCwd_absDir() -{ - req_->setUri("http://localhost/%2fdir/file"); - ftp_->setBaseWorkingDir("/base"); - ftp_->sendCwd(); - char data[32]; - size_t len = sizeof(data); - serverSocket_->readData(data, len); - data[len] = '\0'; - CPPUNIT_ASSERT_EQUAL(std::string("CWD /dir\r\n"), std::string(data)); -} - void FtpConnectionTest::testSendSize() { ftp_->sendSize(); |
