mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Added more tests.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
// The Disc Image Chef
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : btrfs.cs
|
||||
// Filename : unixbfs.cs
|
||||
// Version : 1.0
|
||||
// Author(s) : Natalia Portillo
|
||||
//
|
||||
@@ -48,7 +48,7 @@ using NUnit.Framework;
|
||||
namespace DiscImageChef.Tests.Filesystems
|
||||
{
|
||||
[TestFixture]
|
||||
public class btrfs
|
||||
public class unixbfs
|
||||
{
|
||||
readonly string[] testfiles = {
|
||||
"linux.vdi.lz",
|
||||
@@ -63,19 +63,15 @@ namespace DiscImageChef.Tests.Filesystems
|
||||
};
|
||||
|
||||
readonly long[] clusters = {
|
||||
32512,
|
||||
260096,
|
||||
};
|
||||
|
||||
readonly int[] clustersize = {
|
||||
4096,
|
||||
512,
|
||||
};
|
||||
|
||||
readonly string[] volumename = {
|
||||
"VolumeLabel",
|
||||
};
|
||||
|
||||
readonly string[] volumeserial = {
|
||||
"a4fc5201-85cc-6840-8a68-998cab9ae897",
|
||||
"Label",
|
||||
};
|
||||
|
||||
[Test]
|
||||
@@ -83,7 +79,7 @@ namespace DiscImageChef.Tests.Filesystems
|
||||
{
|
||||
for(int i = 0; i < testfiles.Length; i++)
|
||||
{
|
||||
string location = Path.Combine(Consts.TestFilesRoot, "filesystems", "btrfs", testfiles[i]);
|
||||
string location = Path.Combine(Consts.TestFilesRoot, "filesystems", "unixbfs", testfiles[i]);
|
||||
Filter filter = new LZip();
|
||||
filter.Open(location);
|
||||
ImagePlugin image = new VDI();
|
||||
@@ -92,7 +88,7 @@ namespace DiscImageChef.Tests.Filesystems
|
||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||
PartPlugin parts = new MBR();
|
||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
||||
Filesystem fs = new DiscImageChef.Filesystems.BTRFS();
|
||||
Filesystem fs = new DiscImageChef.Filesystems.BFS();
|
||||
int part = -1;
|
||||
for(int j = 0; j < partitions.Count; j++)
|
||||
{
|
||||
@@ -107,9 +103,8 @@ namespace DiscImageChef.Tests.Filesystems
|
||||
fs.GetInformation(image, partitions[part].PartitionStartSector, partitions[part].PartitionStartSector + partitions[part].PartitionSectors - 1, out string information);
|
||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||
Assert.AreEqual(clustersize[i], fs.XmlFSType.ClusterSize, testfiles[i]);
|
||||
Assert.AreEqual("B-tree file system", fs.XmlFSType.Type, testfiles[i]);
|
||||
Assert.AreEqual("BFS", fs.XmlFSType.Type, testfiles[i]);
|
||||
Assert.AreEqual(volumename[i], fs.XmlFSType.VolumeName, testfiles[i]);
|
||||
Assert.AreEqual(volumeserial[i], fs.XmlFSType.VolumeSerial, testfiles[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user