Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
08f2a8b
ref: Add public APIs.
carlossanlop Sep 22, 2021
973fc8c
src: Expose the archive and entry comments.
carlossanlop Sep 22, 2021
be54e4a
tests: Add update tests for archives and for entries. They cover crea…
carlossanlop Sep 22, 2021
28467ae
Fix encoding detection feedback
carlossanlop Sep 28, 2021
297b9e5
Fix encoding detection feedback
carlossanlop Sep 28, 2021
338b184
Address suggestions
carlossanlop Oct 6, 2021
31a2227
Switch names of archive comment fields.
carlossanlop Oct 18, 2021
78d7e37
Address unicode bit flag sharing problem.
carlossanlop Oct 19, 2021
0a29149
Add more test cases
carlossanlop Oct 19, 2021
b93305b
Adjust tests
carlossanlop Oct 19, 2021
7496628
Add newline so comment only applies to one line
carlossanlop Oct 19, 2021
a949883
Ensure string byte truncation is aligned to encoding's char size.
carlossanlop Nov 27, 2021
9738c30
Remove empty check for non-nullable string. Also remove unnecessary D…
carlossanlop Nov 29, 2021
5179ea2
Defer calculation of truncated encoding string to getter and to writ…
carlossanlop Dec 4, 2021
0e47de4
Rename test arguments
carlossanlop Dec 6, 2021
18bbcd4
Only use bytes[]
carlossanlop Dec 7, 2021
31602b3
Remove unnecessary bit comment
carlossanlop Dec 7, 2021
0ae8a64
Remove unnecessary length check
carlossanlop Dec 7, 2021
e9d5b67
Address feedback
carlossanlop Dec 8, 2021
77b6ee5
Suggestion by adamsitnik: write only if length > 0
carlossanlop Dec 7, 2021
8daedcf
Simplify EntryName code
carlossanlop Dec 8, 2021
1596bb3
Move entryName code to original location
carlossanlop Dec 8, 2021
3444631
In UTF8, use Runes to detect code point length to prevent truncating …
carlossanlop Jan 19, 2022
0749c84
Address suggestions
carlossanlop Feb 3, 2022
b08f0ac
Move ZipTestHelper back to its original position because S.IO.Compres…
carlossanlop Feb 3, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rename test arguments
  • Loading branch information
carlossanlop committed Jan 18, 2022
commit 0e47de4ca58983fbad4d4228d16cdb1763c16327
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ public partial class zip_CreateTests : ZipFileTestBase
[InlineData("latin1", "LÄäÖöÕõÜü", "ascii", "ascii!!!")]
[InlineData("utf-8", "UÄäÖöÕõÜü", "latin1", "LÄäÖöÕõÜü")]
[InlineData("latin1", "LÄäÖöÕõÜü", "utf-8", "UÄäÖöÕõÜü")]
public static void Create_ZipArchiveEntry_DifferentEncodings_FullName_And_Comment(string en1, string s1, string en2, string s2)
public static void Create_ZipArchiveEntry_DifferentEncodings_FullName_And_Comment(string encodingName1, string text1, string encodingName2, string text2)
{
Encoding e1 = Encoding.GetEncoding(en1);
Encoding e2 = Encoding.GetEncoding(en2);
string entryName = e1.GetString(e1.GetBytes(s1));
string comment = e2.GetString(e2.GetBytes(s2));
Encoding encoding1 = Encoding.GetEncoding(encodingName1);
Encoding encoding2 = Encoding.GetEncoding(encodingName2);
string entryName = encoding1.GetString(encoding1.GetBytes(text1));
string comment = encoding2.GetString(encoding2.GetBytes(text2));

var stream = new MemoryStream();
var testStream = new WrappedStream(stream, true, true, true, null);
Expand Down