mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
799 lines
29 KiB
C#
799 lines
29 KiB
C#
// /***************************************************************************
|
|
// Aaru Data Preservation Suite
|
|
// ----------------------------------------------------------------------------
|
|
//
|
|
// Filename : Alcohol.cs
|
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
|
//
|
|
// Component : Aaru unit testing.
|
|
//
|
|
// --[ 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/>.
|
|
//
|
|
// ----------------------------------------------------------------------------
|
|
// Copyright © 2011-2021 Natalia Portillo
|
|
// ****************************************************************************/
|
|
|
|
using System.IO;
|
|
using Aaru.CommonTypes;
|
|
using Aaru.CommonTypes.Interfaces;
|
|
using NUnit.Framework;
|
|
|
|
namespace Aaru.Tests.Images.UltraISO
|
|
{
|
|
[TestFixture]
|
|
public class Alcohol : OpticalMediaImageTest
|
|
{
|
|
public override string DataFolder =>
|
|
Path.Combine(Consts.TEST_FILES_ROOT, "Media image formats", "UltraISO", "Alcohol");
|
|
public override IMediaImage _plugin => new DiscImages.Alcohol120();
|
|
|
|
public override OpticalImageTestExpected[] Tests => new[]
|
|
{
|
|
new OpticalImageTestExpected
|
|
{
|
|
TestFile = "cdiready_the_apprentice.mds",
|
|
MediaType = MediaType.CDROMXA,
|
|
Sectors = 279300,
|
|
MD5 = "556d7d32e3c01c2087cc56b25fe5f66d",
|
|
LongMD5 = "556d7d32e3c01c2087cc56b25fe5f66d",
|
|
Tracks = new[]
|
|
{
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 0,
|
|
End = 88799,
|
|
Pregap = 69300,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 88800,
|
|
End = 107624,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 107625,
|
|
End = 112199,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 112200,
|
|
End = 133649,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 133650,
|
|
End = 138224,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 138225,
|
|
End = 159824,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 159825,
|
|
End = 164774,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 164775,
|
|
End = 185399,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 185400,
|
|
End = 190124,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 190125,
|
|
End = 208874,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 208875,
|
|
End = 212999,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 213000,
|
|
End = 232199,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 232200,
|
|
End = 236699,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 236700,
|
|
End = 241874,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 241875,
|
|
End = 256124,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 256125,
|
|
End = 256874,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 256875,
|
|
End = 265649,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 265650,
|
|
End = 267374,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 267375,
|
|
End = 269999,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 270000,
|
|
End = 271649,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 271650,
|
|
End = 274274,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 274275,
|
|
End = 279299,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
}
|
|
}
|
|
},
|
|
new OpticalImageTestExpected
|
|
{
|
|
TestFile = "report_audiocd.mds",
|
|
MediaType = MediaType.CDROMXA,
|
|
Sectors = 247073,
|
|
MD5 = "c96a7bf12427078bab252d941716cc32",
|
|
LongMD5 = "c96a7bf12427078bab252d941716cc32",
|
|
Tracks = new[]
|
|
{
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 0,
|
|
End = 16548,
|
|
Pregap = 150,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 16549,
|
|
End = 30050,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 30051,
|
|
End = 47949,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 47950,
|
|
End = 63313,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 63314,
|
|
End = 78924,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 78925,
|
|
End = 94731,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 94732,
|
|
End = 117124,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 117125,
|
|
End = 136165,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 136166,
|
|
End = 154071,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 154072,
|
|
End = 170750,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 170751,
|
|
End = 186538,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 186539,
|
|
End = 201798,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 201799,
|
|
End = 224448,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 224449,
|
|
End = 247072,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
}
|
|
}
|
|
},
|
|
new OpticalImageTestExpected
|
|
{
|
|
TestFile = "report_cdrom.mds",
|
|
MediaType = MediaType.CDROM,
|
|
Sectors = 254265,
|
|
MD5 = "bf4bbec517101d0d6f45d2e4d50cb875",
|
|
LongMD5 = "3d3f9cf7d1ba2249b1e7960071e5af46",
|
|
Tracks = new[]
|
|
{
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 0,
|
|
End = 254264,
|
|
Pregap = 150,
|
|
Flags = 4,
|
|
Number = 1,
|
|
FileSystems = new[]
|
|
{
|
|
new FileSystemTest
|
|
{
|
|
Clusters = 63562,
|
|
ClusterSize = 8192,
|
|
Type = "HFS",
|
|
VolumeName = "Winpower"
|
|
},
|
|
new FileSystemTest
|
|
{
|
|
Clusters = 254265,
|
|
ClusterSize = 2048,
|
|
Type = "ISO9660",
|
|
VolumeName = "Winpower"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
new OpticalImageTestExpected
|
|
{
|
|
TestFile = "report_cdrw.mds",
|
|
MediaType = MediaType.CDROM,
|
|
Sectors = 308224,
|
|
MD5 = "1e55aa420ca8f8ea77d5b597c9cfc19b",
|
|
LongMD5 = "3af5f943ddb9427d9c63a4ce3b704db9",
|
|
Tracks = new[]
|
|
{
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 0,
|
|
End = 308223,
|
|
Pregap = 150,
|
|
Flags = 4,
|
|
Number = 1,
|
|
FileSystems = new[]
|
|
{
|
|
new FileSystemTest
|
|
{
|
|
Bootable = true,
|
|
Clusters = 308224,
|
|
ClusterSize = 2048,
|
|
Type = "ISO9660",
|
|
VolumeName = "ARCH_201901"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
new OpticalImageTestExpected
|
|
{
|
|
TestFile = "report_dvdram_v2.mds",
|
|
MediaType = MediaType.DVDROM,
|
|
Sectors = 471090,
|
|
MD5 = "35cb08dd5fedfb8e9ad2918292e51791",
|
|
LongMD5 = "35cb08dd5fedfb8e9ad2918292e51791",
|
|
Tracks = new[]
|
|
{
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 0,
|
|
End = 471089,
|
|
Pregap = 0,
|
|
Number = 1,
|
|
FileSystems = new[]
|
|
{
|
|
new FileSystemTest
|
|
{
|
|
Bootable = true,
|
|
Clusters = 471090,
|
|
ClusterSize = 2048,
|
|
Type = "ISO9660",
|
|
VolumeName = "12_2_RELEASE_AMD64_CD"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
new OpticalImageTestExpected
|
|
{
|
|
TestFile = "report_dvd-r+dl.mds",
|
|
MediaType = MediaType.DVDROM,
|
|
Sectors = 3455920,
|
|
MD5 = "1cd9b9be5c5e337c5e6576156b84b726",
|
|
LongMD5 = "1cd9b9be5c5e337c5e6576156b84b726",
|
|
Tracks = new[]
|
|
{
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 0,
|
|
End = 3455919,
|
|
Pregap = 0,
|
|
Number = 1,
|
|
FileSystems = new[]
|
|
{
|
|
new FileSystemTest
|
|
{
|
|
Clusters = 3455920,
|
|
ClusterSize = 2048,
|
|
Type = "UDF v1.02",
|
|
VolumeName = "Test DVD",
|
|
VolumeSerial = "483E25D50034BBB0"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
new OpticalImageTestExpected
|
|
{
|
|
TestFile = "report_dvdrom.mds",
|
|
MediaType = MediaType.DVDROM,
|
|
Sectors = 2146357,
|
|
MD5 = "5e1841b7cd6ac0a95b8ae6f110fd89f2",
|
|
LongMD5 = "5e1841b7cd6ac0a95b8ae6f110fd89f2",
|
|
Tracks = new[]
|
|
{
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 0,
|
|
End = 2146356,
|
|
Pregap = 0,
|
|
Number = 1,
|
|
FileSystems = new[]
|
|
{
|
|
new FileSystemTest
|
|
{
|
|
Bootable = true,
|
|
Clusters = 2146357,
|
|
ClusterSize = 2048,
|
|
Type = "ISO9660",
|
|
VolumeName = "SU1100.001"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
new OpticalImageTestExpected
|
|
{
|
|
TestFile = "report_enhancedcd.mds",
|
|
MediaType = MediaType.CDPLUS,
|
|
Sectors = 303316,
|
|
MD5 = "97e5bf1caf3998e818d40cd845c6ecc9",
|
|
LongMD5 = "07b4d88c8f38cc0168a2f5725b31c52e",
|
|
Tracks = new[]
|
|
{
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 0,
|
|
End = 15660,
|
|
Pregap = 150,
|
|
Flags = 4
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 15661,
|
|
End = 33958,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 33959,
|
|
End = 51329,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 51330,
|
|
End = 71972,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 71973,
|
|
End = 87581,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 87582,
|
|
End = 103304,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 103305,
|
|
End = 117690,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 117691,
|
|
End = 136166,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 136167,
|
|
End = 153417,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 153418,
|
|
End = 166931,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 166932,
|
|
End = 187112,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 187113,
|
|
End = 201440,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 201441,
|
|
End = 222779,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 2,
|
|
Start = 234030,
|
|
End = 303315,
|
|
Pregap = 150,
|
|
Flags = 0,
|
|
Number = 14,
|
|
FileSystems = new[]
|
|
{
|
|
new FileSystemTest
|
|
{
|
|
Clusters = 69136,
|
|
ClusterSize = 2048,
|
|
Type = "ISO9660",
|
|
VolumeName = "Melanie C"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
new OpticalImageTestExpected
|
|
{
|
|
TestFile = "test_multi_karaoke_sampler.mds",
|
|
MediaType = MediaType.CDROMXA,
|
|
Sectors = 329158,
|
|
MD5 = "9a19aa0df066732a8ec34025e8160248",
|
|
LongMD5 = "e981f7dfdb522ba937fe75474e23a446",
|
|
Tracks = new[]
|
|
{
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 0,
|
|
End = 1886,
|
|
Pregap = 150,
|
|
Flags = 4,
|
|
Number = 1,
|
|
FileSystems = new[]
|
|
{
|
|
new FileSystemTest
|
|
{
|
|
Clusters = 1587,
|
|
ClusterSize = 2048,
|
|
Type = "ISO9660",
|
|
VolumeName = ""
|
|
}
|
|
}
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 1887,
|
|
End = 32748,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 32749,
|
|
End = 52671,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 52672,
|
|
End = 70303,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 70304,
|
|
End = 100097,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 100098,
|
|
End = 119760,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 119761,
|
|
End = 136998,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 136999,
|
|
End = 155789,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 155790,
|
|
End = 175825,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 175826,
|
|
End = 206460,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 206461,
|
|
End = 226449,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 226450,
|
|
End = 244354,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 244355,
|
|
End = 273964,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 273965,
|
|
End = 293751,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 293752,
|
|
End = 310710,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
},
|
|
new TrackInfoTestExpected
|
|
{
|
|
Session = 1,
|
|
Start = 310711,
|
|
End = 329157,
|
|
Pregap = 0,
|
|
Flags = 0
|
|
}
|
|
}
|
|
}
|
|
};
|
|
}
|
|
} |