Skip to content

Commit f44f729

Browse files
committed
Add tests for extracting files with UTF-8 filename.
1 parent e5648c2 commit f44f729

File tree

4 files changed

+28
-12
lines changed

4 files changed

+28
-12
lines changed

Tests/ArchiveReaderTest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,7 @@ public static IEnumerable<TestCaseData> TestCases
470470
yield return new TestCaseData("SampleVolume.rar.001", "");
471471
yield return new TestCaseData("SampleComma.zip", "");
472472
yield return new TestCaseData("SampleMac.zip", "");
473+
yield return new TestCaseData("SampleUtf8.zip", "");
473474
yield return new TestCaseData("Sample.tar", "");
474475
yield return new TestCaseData("Sample.tar.bz2", "");
475476
yield return new TestCaseData("Sample.tar.gz", "");

Tests/Cube.FileSystem.SevenZip.Tests.csproj

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,9 @@
217217
<None Include="Examples\Expected\SampleMac.zip.txt">
218218
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
219219
</None>
220+
<None Include="Examples\Expected\SampleUtf8.zip.txt">
221+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
222+
</None>
220223
<None Include="Examples\Expected\SampleVolume.rar.001.txt">
221224
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
222225
</None>
@@ -352,6 +355,21 @@
352355
<None Include="Examples\Sample.zip">
353356
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
354357
</None>
358+
<None Include="Examples\SampleComma.zip">
359+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
360+
</None>
361+
<None Include="Examples\SampleEmpty.7z">
362+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
363+
</None>
364+
<None Include="Examples\SampleFilter.zip">
365+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
366+
</None>
367+
<None Include="Examples\SampleMac.zip">
368+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
369+
</None>
370+
<None Include="Examples\SampleUtf8.zip">
371+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
372+
</None>
355373
<None Include="Examples\SampleVolume.rar.001">
356374
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
357375
</None>
@@ -382,18 +400,6 @@
382400
<None Include="Examples\SampleVolume.zip">
383401
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
384402
</None>
385-
<None Include="Examples\SampleComma.zip">
386-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
387-
</None>
388-
<None Include="Examples\SampleEmpty.7z">
389-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
390-
</None>
391-
<None Include="Examples\SampleFilter.zip">
392-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
393-
</None>
394-
<None Include="Examples\SampleMac.zip">
395-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
396-
</None>
397403
</ItemGroup>
398404
<ItemGroup>
399405
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
"Root",0
2+
"Root\Users",0
3+
"Root\Users\dummy",0
4+
"Root\Users\dummy\Objects",0
5+
"Root\Users\dummy\Objects\写真",0
6+
"Root\Users\dummy\Objects\写真\2017-12-04_関西空港",0
7+
"Root\Users\dummy\Objects\写真\2017-12-04_関西空港\IMG_0001.txt",20
8+
"Root\Users\dummy\Objects\写真\2017-12-04_関西空港\IMG_0002.txt",33
9+
"Root\Users\dummy\Objects\写真\2017-12-04_関西空港\IMG_0003.txt",50

Tests/Examples/SampleUtf8.zip

1.78 KB
Binary file not shown.

0 commit comments

Comments
 (0)