mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Use generic method to search for partitions, supporting
partitions inside partitions. At the same time SGI DVH is disabled because it is not working correctly. Fixes #60
This commit is contained in:
@@ -64,11 +64,11 @@ namespace DiscImageChef.Tests.Filesystems
|
||||
};
|
||||
|
||||
readonly long[] clusters = {
|
||||
1020064
|
||||
63689
|
||||
};
|
||||
|
||||
readonly int[] clustersize = {
|
||||
512,
|
||||
8192,
|
||||
};
|
||||
|
||||
readonly string[] volumename = {
|
||||
@@ -76,7 +76,7 @@ namespace DiscImageChef.Tests.Filesystems
|
||||
};
|
||||
|
||||
readonly string[] volumeserial = {
|
||||
"UNKNOWN ",
|
||||
"374D40D1",
|
||||
};
|
||||
|
||||
readonly string[] oemid = {
|
||||
@@ -86,8 +86,6 @@ namespace DiscImageChef.Tests.Filesystems
|
||||
[Test]
|
||||
public void Test()
|
||||
{
|
||||
throw new NotImplementedException("Partition schemes inside partitions are not yet implemented, and should be tested here.");
|
||||
/*
|
||||
for(int i = 0; i < testfiles.Length; i++)
|
||||
{
|
||||
string location = Path.Combine(Consts.TestFilesRoot, "filesystems", "fat16_rdb", testfiles[i]);
|
||||
@@ -97,28 +95,27 @@ namespace DiscImageChef.Tests.Filesystems
|
||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||
PartPlugin parts = new AmigaRigidDiskBlock();
|
||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
||||
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||
Filesystem fs = new DiscImageChef.Filesystems.FAT();
|
||||
int part = -1;
|
||||
for(int j = 0; j < partitions.Count; j++)
|
||||
{
|
||||
if(partitions[j].PartitionType == "\"RES\\86\"")
|
||||
if(partitions[j].Type == "0x06")
|
||||
{
|
||||
part = j;
|
||||
break;
|
||||
}
|
||||
}
|
||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
||||
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||
fs.GetInformation(image, partitions[part], out string information);
|
||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||
Assert.AreEqual(clustersize[i], fs.XmlFSType.ClusterSize, testfiles[i]);
|
||||
Assert.AreEqual("Amiga FFS", fs.XmlFSType.Type, testfiles[i]);
|
||||
Assert.AreEqual("FAT16", fs.XmlFSType.Type, testfiles[i]);
|
||||
Assert.AreEqual(volumename[i], fs.XmlFSType.VolumeName, testfiles[i]);
|
||||
Assert.AreEqual(volumeserial[i], fs.XmlFSType.VolumeSerial, testfiles[i]);
|
||||
Assert.AreEqual(oemid[i], fs.XmlFSType.SystemIdentifier, testfiles[i]);
|
||||
}*/
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user