summaryrefslogtreecommitdiffstats
path: root/o3d/import/cross/tar_processor_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'o3d/import/cross/tar_processor_test.cc')
-rw-r--r--o3d/import/cross/tar_processor_test.cc20
1 files changed, 14 insertions, 6 deletions
diff --git a/o3d/import/cross/tar_processor_test.cc b/o3d/import/cross/tar_processor_test.cc
index 3e7afaa..1317042 100644
--- a/o3d/import/cross/tar_processor_test.cc
+++ b/o3d/import/cross/tar_processor_test.cc
@@ -42,17 +42,22 @@ class TarProcessorTest : public testing::Test {
// 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 @@ void TarTestClient::ReceiveFileHeader(const ArchiveFileInfo &file_info) {
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_++;