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

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: data files 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
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..354177024562820df9ac75c02cfc9bc9e6a5a1a8 100644
--- a/net/ftp/ftp_directory_listing_parser_ls_unittest.cc
+++ b/net/ftp/ftp_directory_listing_parser_ls_unittest.cc
@@ -124,6 +124,21 @@ 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 },
+ { "drwxr-sr-x 5 22623 10 512 Jan 17 1996 sat-files",
+ FtpDirectoryListingEntry::DIRECTORY, "sat-files", -1,
+ 1996, 1, 17, 0, 0 },
mmenke 2012/12/03 21:59:05 Does this differ in any significant way from the 5
+
+ // 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,

Powered by Google App Engine
This is Rietveld 408576698