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

Unified Diff: import/cross/tar_processor_test.cc

Issue 159129: Refactor tar code to support long names.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: Created 11 years, 5 months 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: import/cross/tar_processor_test.cc
===================================================================
--- import/cross/tar_processor_test.cc (revision 21085)
+++ import/cross/tar_processor_test.cc (working copy)
@@ -42,17 +42,22 @@
// We verify that the tar file contains exactly these filenames
static const char *kFilename1 = "test/file1";
-static const char *kFilename2 = "test/file2";
-static const char *kFilename3 = "test/file3";
+static const char *kFilename2 =
+ "test/file1ThisIsAFilenameLongerThen100Chars"
+ "ThisIsAFilenameLongerThen100Chars"
+ "ThisIsAFilenameLongerThen100CharsThisIsAFilenameLongerThen100Chars";
+static const char *kFilename3 = "test/file2";
+static const char *kFilename4 = "test/file3";
// With each file having these exact contents
-#define kFileContents1 "the cat in the hat\n"
-#define kFileContents2 "abracadabra\n"
-#define kFileContents3 "I think therefore I am\n"
// we should receive these (and exactly these bytes in this order)
static const char *kConcatenatedContents =
- kFileContents1 kFileContents2 kFileContents3;
+ "the cat in the hat\n" // file 1 contents.
+ "this file has a long name" // file 2 contents.
+ "abracadabra\n" // file 3 contents.
+ "I think therefore I am\n" // file 4 contents.
+ ""; // end
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class TarTestClient : public ArchiveCallbackClient {
@@ -85,6 +90,9 @@
case 2:
EXPECT_TRUE(!strcmp(kFilename3, file_info.GetFileName().c_str()));
break;
+ case 3:
+ EXPECT_TRUE(!strcmp(kFilename4, file_info.GetFileName().c_str()));
+ break;
}
file_count_++;

Powered by Google App Engine
This is Rietveld 408576698