mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-02-04 05:35:49 +00:00
Fix all broken tests from previous update
This commit is contained in:
@@ -63,7 +63,7 @@ namespace BinaryObjectScanner.Test
|
||||
WrapperType.BZip2,
|
||||
WrapperType.CFB,
|
||||
//WrapperType.CIA,
|
||||
//WrapperType.Executable,
|
||||
WrapperType.Executable,
|
||||
WrapperType.GCF,
|
||||
WrapperType.GZip,
|
||||
WrapperType.InstallShieldArchiveV3,
|
||||
|
||||
@@ -26,7 +26,8 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
string outDir = string.Empty;
|
||||
var extractable = new InstallShieldCAB();
|
||||
|
||||
Assert.Throws<ArgumentException>(() => extractable.Extract(stream, file, outDir, includeDebug: false));
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -37,7 +38,8 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
string outDir = string.Empty;
|
||||
var extractable = new InstallShieldCAB();
|
||||
|
||||
Assert.Throws<ArgumentException>(() => extractable.Extract(stream, file, outDir, includeDebug: false));
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ExtractStream_Empty_True()
|
||||
public void ExtractStream_Empty_False()
|
||||
{
|
||||
Stream? stream = new MemoryStream();
|
||||
string file = string.Empty;
|
||||
@@ -38,9 +38,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
var extractable = new TapeArchive();
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
|
||||
// Unexpected result -- Empty file recognized as valid in SharpCompress
|
||||
Assert.True(actual);
|
||||
Assert.False(actual);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user