2017-07-01 02:49:09 +01:00
|
|
|
|
// /***************************************************************************
|
2020-07-25 02:01:36 +01:00
|
|
|
|
// Aaru Data Preservation Suite
|
2017-07-01 02:49:09 +01:00
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
//
|
|
|
|
|
|
// Filename : ADFS.cs
|
2017-12-19 03:50:57 +00:00
|
|
|
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
2017-07-01 02:49:09 +01:00
|
|
|
|
//
|
2020-07-25 02:01:36 +01:00
|
|
|
|
// Component : Aaru unit testing.
|
2017-07-01 02:49:09 +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/>.
|
|
|
|
|
|
//
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
2022-12-03 16:07:10 +00:00
|
|
|
|
// Copyright © 2011-2023 Natalia Portillo
|
2017-07-01 02:49:09 +01:00
|
|
|
|
// ****************************************************************************/
|
2017-12-19 03:50:57 +00:00
|
|
|
|
|
2017-07-01 03:40:06 +01:00
|
|
|
|
using System.IO;
|
2020-02-27 00:33:26 +00:00
|
|
|
|
using Aaru.CommonTypes;
|
|
|
|
|
|
using Aaru.CommonTypes.Interfaces;
|
|
|
|
|
|
using Aaru.Filesystems;
|
2017-12-19 19:33:46 +00:00
|
|
|
|
using NUnit.Framework;
|
2017-07-01 03:40:06 +01:00
|
|
|
|
|
2022-11-15 15:58:43 +00:00
|
|
|
|
namespace Aaru.Tests.Filesystems;
|
|
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
[TestFixture]
|
|
|
|
|
|
public class Adfs : FilesystemTest
|
2017-07-01 02:49:09 +01:00
|
|
|
|
{
|
2022-12-07 22:00:19 +00:00
|
|
|
|
public Adfs() : base("adfs") {}
|
2021-03-01 19:34:30 +00:00
|
|
|
|
|
2022-11-13 05:48:58 +00:00
|
|
|
|
public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Filesystems",
|
2022-03-06 13:29:38 +00:00
|
|
|
|
"Acorn Advanced Disc Filing System");
|
2021-03-01 19:34:30 +00:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
public override IFilesystem Plugin => new AcornADFS();
|
|
|
|
|
|
public override bool Partitions => false;
|
2021-03-01 19:34:30 +00:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
public override FileSystemTest[] Tests => new[]
|
|
|
|
|
|
{
|
|
|
|
|
|
new FileSystemTest
|
|
|
|
|
|
{
|
|
|
|
|
|
TestFile = "adfs_d.adf.lz",
|
|
|
|
|
|
MediaType = MediaType.ACORN_35_DS_DD,
|
|
|
|
|
|
Sectors = 800,
|
|
|
|
|
|
SectorSize = 1024,
|
|
|
|
|
|
Clusters = 800,
|
|
|
|
|
|
ClusterSize = 1024,
|
|
|
|
|
|
VolumeName = "ADFSD",
|
|
|
|
|
|
VolumeSerial = "3E48"
|
|
|
|
|
|
},
|
|
|
|
|
|
new FileSystemTest
|
|
|
|
|
|
{
|
|
|
|
|
|
TestFile = "adfs_e.adf.lz",
|
|
|
|
|
|
MediaType = MediaType.ACORN_35_DS_DD,
|
|
|
|
|
|
Sectors = 800,
|
|
|
|
|
|
SectorSize = 1024,
|
|
|
|
|
|
Clusters = 800,
|
|
|
|
|
|
ClusterSize = 1024,
|
|
|
|
|
|
VolumeName = "ADFSE ",
|
|
|
|
|
|
VolumeSerial = "E13A"
|
|
|
|
|
|
},
|
|
|
|
|
|
new FileSystemTest
|
|
|
|
|
|
{
|
|
|
|
|
|
TestFile = "adfs_f.adf.lz",
|
|
|
|
|
|
MediaType = MediaType.ACORN_35_DS_HD,
|
|
|
|
|
|
Sectors = 1600,
|
|
|
|
|
|
SectorSize = 1024,
|
|
|
|
|
|
Clusters = 1600,
|
|
|
|
|
|
ClusterSize = 1024
|
|
|
|
|
|
},
|
|
|
|
|
|
new FileSystemTest
|
|
|
|
|
|
{
|
|
|
|
|
|
TestFile = "adfs_e+.adf.lz",
|
|
|
|
|
|
MediaType = MediaType.ACORN_35_DS_DD,
|
|
|
|
|
|
Sectors = 800,
|
|
|
|
|
|
SectorSize = 1024,
|
|
|
|
|
|
Clusters = 800,
|
|
|
|
|
|
ClusterSize = 1024,
|
|
|
|
|
|
VolumeName = "ADFSE+ ",
|
|
|
|
|
|
VolumeSerial = "1142"
|
|
|
|
|
|
},
|
|
|
|
|
|
new FileSystemTest
|
|
|
|
|
|
{
|
|
|
|
|
|
TestFile = "adfs_f+.adf.lz",
|
|
|
|
|
|
MediaType = MediaType.ACORN_35_DS_HD,
|
|
|
|
|
|
Sectors = 1600,
|
|
|
|
|
|
SectorSize = 1024,
|
|
|
|
|
|
Clusters = 1600,
|
|
|
|
|
|
ClusterSize = 1024
|
|
|
|
|
|
},
|
|
|
|
|
|
new FileSystemTest
|
|
|
|
|
|
{
|
|
|
|
|
|
TestFile = "adfs_s.adf.lz",
|
|
|
|
|
|
MediaType = MediaType.ACORN_525_SS_DD_40,
|
|
|
|
|
|
Sectors = 640,
|
|
|
|
|
|
SectorSize = 256,
|
|
|
|
|
|
Clusters = 640,
|
|
|
|
|
|
ClusterSize = 256,
|
|
|
|
|
|
VolumeName = "$",
|
|
|
|
|
|
VolumeSerial = "F20D"
|
|
|
|
|
|
},
|
|
|
|
|
|
new FileSystemTest
|
|
|
|
|
|
{
|
|
|
|
|
|
TestFile = "adfs_m.adf.lz",
|
|
|
|
|
|
MediaType = MediaType.ACORN_525_SS_DD_80,
|
|
|
|
|
|
Sectors = 1280,
|
|
|
|
|
|
SectorSize = 256,
|
|
|
|
|
|
Clusters = 1280,
|
|
|
|
|
|
ClusterSize = 256,
|
|
|
|
|
|
VolumeName = "$",
|
|
|
|
|
|
VolumeSerial = "D6CA"
|
|
|
|
|
|
},
|
|
|
|
|
|
new FileSystemTest
|
|
|
|
|
|
{
|
|
|
|
|
|
TestFile = "adfs_l.adf.lz",
|
|
|
|
|
|
MediaType = MediaType.ACORN_525_DS_DD,
|
|
|
|
|
|
Sectors = 2560,
|
|
|
|
|
|
SectorSize = 256,
|
|
|
|
|
|
Clusters = 2560,
|
|
|
|
|
|
ClusterSize = 256,
|
|
|
|
|
|
VolumeName = "$",
|
|
|
|
|
|
VolumeSerial = "0CA6"
|
|
|
|
|
|
},
|
|
|
|
|
|
new FileSystemTest
|
|
|
|
|
|
{
|
|
|
|
|
|
TestFile = "hdd_old.hdf.lz",
|
|
|
|
|
|
MediaType = MediaType.GENERIC_HDD,
|
|
|
|
|
|
Sectors = 78336,
|
|
|
|
|
|
SectorSize = 256,
|
|
|
|
|
|
Clusters = 78336,
|
|
|
|
|
|
ClusterSize = 256,
|
|
|
|
|
|
VolumeName = "VolLablOld",
|
|
|
|
|
|
VolumeSerial = "080E"
|
|
|
|
|
|
},
|
|
|
|
|
|
new FileSystemTest
|
2017-12-19 20:33:03 +00:00
|
|
|
|
{
|
2022-03-06 13:29:38 +00:00
|
|
|
|
TestFile = "hdd_new.hdf.lz",
|
|
|
|
|
|
MediaType = MediaType.GENERIC_HDD,
|
|
|
|
|
|
Sectors = 78336,
|
|
|
|
|
|
SectorSize = 256,
|
|
|
|
|
|
Clusters = 78336,
|
|
|
|
|
|
ClusterSize = 256
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
2017-12-19 20:33:03 +00:00
|
|
|
|
}
|