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

Unified Diff: third_party/zlib/google/zip_unittest.cc

Issue 106663006: Followup for bug when zipping a folder with non-ascii chars in its name. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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 | « third_party/zlib/google/zip.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/zlib/google/zip_unittest.cc
diff --git a/third_party/zlib/google/zip_unittest.cc b/third_party/zlib/google/zip_unittest.cc
index 0572b853ba8973bf2a2e219ad8a7fbfa7d8f0e60..1023705f1b8b33e466b5625759be42eabbf36935 100644
--- a/third_party/zlib/google/zip_unittest.cc
+++ b/third_party/zlib/google/zip_unittest.cc
@@ -174,6 +174,24 @@ TEST_F(ZipTest, ZipIgnoreHidden) {
TestUnzipFile(zip_file, false);
}
+TEST_F(ZipTest, ZipNonASCIIDir) {
+ base::FilePath src_dir;
+ ASSERT_TRUE(GetTestDataDirectory(&src_dir));
+ src_dir = src_dir.AppendASCII("test");
+
+ base::ScopedTempDir temp_dir;
+ ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
+ // Append 'Тест' (in cyrillic).
+ base::FilePath src_dir_russian =
+ temp_dir.path().Append(base::FilePath::FromUTF8Unsafe(
+ "\xD0\xA2\xD0\xB5\xD1\x81\xD1\x82"));
+ base::CopyDirectory(src_dir, src_dir_russian, true);
+ base::FilePath zip_file = temp_dir.path().AppendASCII("out_russian.zip");
+
+ EXPECT_TRUE(zip::Zip(src_dir_russian, zip_file, true));
+ TestUnzipFile(zip_file, true);
+}
+
#if defined(OS_POSIX)
TEST_F(ZipTest, ZipFiles) {
base::FilePath src_dir;
« no previous file with comments | « third_party/zlib/google/zip.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698