mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-16 05:25:03 +00:00
* First pass. Writing isn't implemented on stream. Tests are busted. * LZipReader works...no file name :( * LZipWriter works * Writing tests are actually correct now. LZipStream correctly writes trailer now. lzip command line tool likes it. * Add recommendation blurb * Update notes for formats * LZip isn't an archive format * Attempting to fix and implement crc32 * LZip writing test passes * Had to invert crc to check uncompressed data.
39 lines
989 B
C#
39 lines
989 B
C#
using SharpCompress.Common;
|
|
using Xunit;
|
|
|
|
namespace SharpCompress.Test.Tar
|
|
{
|
|
public class TarWriterTests : WriterTests
|
|
{
|
|
public TarWriterTests()
|
|
: base(ArchiveType.Tar)
|
|
{
|
|
UseExtensionInsteadOfNameToVerify = true;
|
|
}
|
|
|
|
[Fact]
|
|
public void Tar_Writer()
|
|
{
|
|
Write(CompressionType.None, "Tar.noEmptyDirs.tar", "Tar.noEmptyDirs.tar");
|
|
}
|
|
|
|
[Fact]
|
|
public void Tar_BZip2_Writer()
|
|
{
|
|
Write(CompressionType.BZip2, "Tar.noEmptyDirs.tar.bz2", "Tar.noEmptyDirs.tar.bz2");
|
|
}
|
|
|
|
[Fact]
|
|
public void Tar_LZip_Writer()
|
|
{
|
|
Write(CompressionType.LZip, "Tar.noEmptyDirs.tar.lz", "Tar.noEmptyDirs.tar.lz");
|
|
}
|
|
|
|
[Fact]
|
|
public void Tar_Rar_Write()
|
|
{
|
|
Assert.Throws<InvalidFormatException>(() => Write(CompressionType.Rar, "Zip.ppmd.noEmptyDirs.zip", "Zip.ppmd.noEmptyDirs.zip"));
|
|
}
|
|
}
|
|
}
|