Files
Aaru/Aaru.Tests/Partitions/RDB.cs

214 lines
7.0 KiB
C#
Raw Normal View History

2017-07-18 06:33:47 +01:00
// /***************************************************************************
2020-07-25 02:01:36 +01:00
// Aaru Data Preservation Suite
2017-07-18 06:33:47 +01:00
// ----------------------------------------------------------------------------
//
// Filename : RDB.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
2017-07-18 06:33:47 +01:00
//
2020-07-25 02:01:36 +01:00
// Component : Aaru unit testing.
2017-07-18 06:33:47 +01:00
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
2024-12-19 10:45:18 +00:00
// Copyright © 2011-2025 Natalia Portillo
2017-07-18 06:33:47 +01:00
// ****************************************************************************/
2017-07-18 06:33:47 +01:00
using System.IO;
2020-02-27 00:33:26 +00:00
using Aaru.CommonTypes;
2017-07-18 06:33:47 +01:00
using NUnit.Framework;
namespace Aaru.Tests.Partitions;
2022-03-06 13:29:38 +00:00
[TestFixture]
public class Rdb : PartitionSchemeTest
2017-07-18 06:33:47 +01:00
{
public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Partitioning schemes", "Rigid Disk Block");
2024-05-01 04:39:38 +01:00
public override PartitionTest[] Tests =>
[
new()
2020-02-29 18:03:35 +00:00
{
2022-03-06 13:29:38 +00:00
TestFile = "amigaos_3.9.aif",
2024-05-01 04:39:38 +01:00
Partitions =
[
2022-03-06 13:29:38 +00:00
new Partition
{
Length = 170688,
Name = "UDH0",
Offset = 2080768,
Sequence = 0,
Size = 87392256,
Start = 4064,
Type = "\"DOS\\0\""
},
new Partition
{
Length = 170688,
Name = "UDH1",
Offset = 89473024,
Sequence = 1,
Size = 87392256,
Start = 174752,
Type = "\"DOS\\2\""
},
new Partition
2017-12-19 20:33:03 +00:00
{
2022-03-06 13:29:38 +00:00
Length = 170688,
Name = "UDH2",
Offset = 176865280,
Sequence = 2,
Size = 87392256,
Start = 345440,
Type = "\"DOS\\1\""
},
new Partition
{
Length = 170688,
Name = "UDH3",
Offset = 264257536,
Sequence = 3,
Size = 87392256,
Start = 516128,
Type = "\"DOS\\3\""
},
new Partition
{
Length = 170508,
Name = "FAT16",
Offset = 351663104,
Sequence = 4,
Size = 87300096,
Start = 686842,
Type = "0x06"
},
new Partition
{
Length = 166624,
Name = "UDH5",
Offset = 439042048,
Sequence = 5,
Size = 85311488,
Start = 857504,
Type = "\"RES\\86\""
2017-12-21 02:52:12 +00:00
}
2024-05-01 04:39:38 +01:00
]
2022-03-06 13:29:38 +00:00
},
new()
2022-03-06 13:29:38 +00:00
{
TestFile = "amigaos_4.0.aif",
2024-05-01 04:39:38 +01:00
Partitions =
[
2022-03-06 13:29:38 +00:00
new Partition
2017-12-19 20:33:03 +00:00
{
2022-03-06 13:29:38 +00:00
Length = 178624,
Name = "DH1",
Offset = 1048576,
Sequence = 0,
Size = 91455488,
Start = 2048,
Type = "\"DOS\\1\""
},
new Partition
{
Length = 149504,
Name = "DH2",
Offset = 92504064,
Sequence = 1,
Size = 76546048,
Start = 180672,
Type = "\"DOS\\3\""
},
new Partition
{
Length = 153792,
Name = "DH3",
Offset = 169050112,
Sequence = 2,
Size = 78741504,
Start = 330176,
Type = "\"DOS\\3\""
},
new Partition
{
Length = 152384,
Name = "DH4",
Offset = 247791616,
Sequence = 3,
Size = 78020608,
Start = 483968,
Type = "\"DOS\\7\""
},
new Partition
{
Length = 166016,
Name = "DH5",
Offset = 325812224,
Sequence = 4,
Size = 85000192,
Start = 636352,
Type = "\"SFS\\0\""
},
new Partition
{
Length = 221760,
Name = "DH6",
Offset = 410812416,
Sequence = 5,
Size = 113541120,
Start = 802368,
Type = "\"SFS\\2\""
2017-12-21 02:52:12 +00:00
}
2024-05-01 04:39:38 +01:00
]
2022-03-06 13:29:38 +00:00
},
new()
2022-03-06 13:29:38 +00:00
{
TestFile = "parted.aif",
2024-05-01 04:39:38 +01:00
Partitions =
[
2022-03-06 13:29:38 +00:00
new Partition
{
Length = 16065,
Name = "primary",
Offset = 8225280,
Sequence = 0,
Size = 8225280,
Start = 16065,
Type = "\"\0\0\0\\0\""
},
new Partition
{
Length = 48195,
Name = "name",
Offset = 16450560,
Sequence = 1,
Size = 24675840,
Start = 32130,
Type = "\"FAT\\1\""
},
new Partition
2017-12-19 20:33:03 +00:00
{
2022-03-06 13:29:38 +00:00
Length = 176715,
Name = "partition",
Offset = 41126400,
Sequence = 2,
Size = 90478080,
Start = 80325,
Type = "\"\0\0\0\\0\""
2017-12-21 02:52:12 +00:00
}
2024-05-01 04:39:38 +01:00
]
2022-03-06 13:29:38 +00:00
}
2024-05-01 04:39:38 +01:00
];
2017-12-19 20:33:03 +00:00
}