Skip to content

Commit

Permalink
More test tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
kientzle committed Jul 7, 2024
1 parent 94006d3 commit 7e91b7a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions libarchive/test/test_pax_filename_encoding.c
Original file line number Diff line number Diff line change
Expand Up @@ -668,10 +668,10 @@ DEFINE_TEST(test_pax_filename_encoding_UTF16_win)

/* Part 2: directory */
p += 512; /* Pax extension header */
assertEqualString(p + 0, "PaxHeader/\xD0\xBF\xD1\x80\xD0\xB8/"); /* File name */
assertEqualString(p + 0, "PaxHeader/\xD0\xBF\xD1\x80\xD0\xB8"); /* File name */
assertEqualInt(p[156], 'x');
p += 512; /* Pax extension body */
assertEqualString(p + 0, "16 path=\xD0\xBF\xD1\x80\xD0\xB8\n");
assertEqualString(p + 0, "16 path=\xD0\xBF\xD1\x80\xD0\xB8/\n");
p += 512; /* Ustar header */
assertEqualString(p + 0, "\xD0\xBF\xD1\x80\xD0\xB8/"); /* File name */
assertEqualInt(p[156], '5'); /* directory */
Expand Down Expand Up @@ -708,7 +708,10 @@ DEFINE_TEST(test_pax_filename_encoding_UTF16_win)
a = archive_read_new();
archive_read_support_format_all(a);
archive_read_support_filter_all(a);
assertEqualInt(ARCHIVE_OK, archive_read_set_options(a, "hdrcharset=UTF-8"));
// @dunhor added this in #2248, but I really don't believe
// this should be necessary, since hdrcharset=UTF-8 is the default
// for pax archives. There's something screwy going on here still...
// assertEqualInt(ARCHIVE_OK, archive_read_set_options(a, "hdrcharset=UTF-8"));
assertEqualInt(0, archive_read_open_memory(a, buff, used));

/* Read part 1: file */
Expand Down

0 comments on commit 7e91b7a

Please sign in to comment.