Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1189)

Unified Diff: net/ftp/ftp_directory_listing_parser_ls_unittest.cc

Issue 11418296: FTP: misc fixes resulting from my testing. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fixes Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/ftp/ftp_directory_listing_parser_ls.cc ('k') | net/ftp/ftp_directory_listing_parser_netware.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/ftp/ftp_directory_listing_parser_ls_unittest.cc
diff --git a/net/ftp/ftp_directory_listing_parser_ls_unittest.cc b/net/ftp/ftp_directory_listing_parser_ls_unittest.cc
index 9da23cf429fe2c4f513b703b896464a72bf29f87..456fb6e3e5aa4c099251160e6cbccb3a38a9110f 100644
--- a/net/ftp/ftp_directory_listing_parser_ls_unittest.cc
+++ b/net/ftp/ftp_directory_listing_parser_ls_unittest.cc
@@ -124,6 +124,18 @@ TEST_F(FtpDirectoryListingParserLsTest, Good) {
{ "-rwxrwxrwx 2 root root 4096 2012-02-07 00:31 notas_servico",
FtpDirectoryListingEntry::FILE, "notas_servico", 4096,
2012, 2, 7, 0, 31 },
+
+ // Weird permission bits.
+ { "drwx--l--- 2 0 10 512 Dec 22 1994 swetzel",
+ FtpDirectoryListingEntry::DIRECTORY, "swetzel", -1,
+ 1994, 12, 22, 0, 0 },
+
+ // Garbage in date (but still parseable).
+ { "lrw-rw-rw- 1 user group 542 "
+ "/t11/member/incomingFeb 8 2007 "
+ "Shortcut to incoming.lnk -> /t11/member/incoming",
+ FtpDirectoryListingEntry::SYMLINK, "Shortcut to incoming.lnk", -1,
+ 2007, 2, 8, 0, 0 },
};
for (size_t i = 0; i < arraysize(good_cases); i++) {
SCOPED_TRACE(base::StringPrintf("Test[%" PRIuS "]: %s", i,
« no previous file with comments | « net/ftp/ftp_directory_listing_parser_ls.cc ('k') | net/ftp/ftp_directory_listing_parser_netware.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698