mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-09-23 23:45:14 +00:00
add failing test
This commit is contained in:
@@ -832,4 +832,15 @@ public class ZipArchiveTests : ArchiveTests
|
||||
using var _ = firstEntry.OpenEntryStream();
|
||||
Assert.Equal(29, firstEntry.Comment.Length);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Zip_FilePermissions()
|
||||
{
|
||||
using var archive = ArchiveFactory.Open(Path.Combine(TEST_ARCHIVES_PATH, "Zip.644.zip"));
|
||||
|
||||
var firstEntry = archive.Entries.First();
|
||||
const int S_IFREG = 0x8000;
|
||||
const int expected = (S_IFREG | 0b110_100_100) << 16; // 0644 mode regular file
|
||||
Assert.Equal(expected, firstEntry.Attrib);
|
||||
}
|
||||
}
|
||||
|
||||
BIN
tests/TestArchives/Archives/Zip.644.zip
Normal file
BIN
tests/TestArchives/Archives/Zip.644.zip
Normal file
Binary file not shown.
Reference in New Issue
Block a user