diff --git a/SabreTools.Core/Tools/Utilities.cs b/SabreTools.Core/Tools/Utilities.cs
index 1d8d51e9..60e98442 100644
--- a/SabreTools.Core/Tools/Utilities.cs
+++ b/SabreTools.Core/Tools/Utilities.cs
@@ -176,6 +176,7 @@ namespace SabreTools.Core.Tools
case "sha256":
case "sha384":
case "sha512":
+ case "spamsum":
case "ssv":
case "tsv":
case "txt":
diff --git a/SabreTools.DatFiles/Formats/Hashfile.cs b/SabreTools.DatFiles/Formats/Hashfile.cs
index 8fac5ebc..e665f121 100644
--- a/SabreTools.DatFiles/Formats/Hashfile.cs
+++ b/SabreTools.DatFiles/Formats/Hashfile.cs
@@ -47,7 +47,7 @@ namespace SabreTools.DatFiles.Formats
string name = string.Empty;
string hash = string.Empty;
- // If we have CRC, then it's an SFV file and the name is first are
+ // If we have CRC, then it's an SFV file and the name is first
if (_hash.HasFlag(Hash.CRC))
{
name = split[0].Replace("*", String.Empty);
diff --git a/SabreTools.Skippers/SabreTools.Skippers.csproj b/SabreTools.Skippers/SabreTools.Skippers.csproj
index 78a72cbc..7a7a1720 100644
--- a/SabreTools.Skippers/SabreTools.Skippers.csproj
+++ b/SabreTools.Skippers/SabreTools.Skippers.csproj
@@ -12,43 +12,11 @@
-
-
-
-
-
-
-
-
-
+
-
- Always
-
-
- Always
-
-
- Always
-
-
- Always
-
-
- Always
-
-
- Always
-
-
- Always
-
-
- Always
-
-
+
Always
diff --git a/SabreTools.Test/DatTools/ParserTests.cs b/SabreTools.Test/DatTools/ParserTests.cs
new file mode 100644
index 00000000..cd06e4a7
--- /dev/null
+++ b/SabreTools.Test/DatTools/ParserTests.cs
@@ -0,0 +1,52 @@
+using System;
+using System.IO;
+
+using SabreTools.DatFiles;
+using SabreTools.DatTools;
+using Xunit;
+
+namespace SabreTools.Test.DatTools
+{
+ public class ParserTests
+ {
+ // TODO: Create files for each of these
+ // TODO: Ensure that all stress all bits of reading
+ // TODO: Add total count? Might be a good metric if everything read
+ [Theory]
+ [InlineData(null, (DatFormat)0x00)]
+ //[InlineData(null, DatFormat.Logiqx)]
+ //[InlineData(null, DatFormat.LogiqxDeprecated)] // Not parsed separately
+ //[InlineData(null, DatFormat.SoftwareList)]
+ //[InlineData(null, DatFormat.Listxml)]
+ //[InlineData(null, DatFormat.OfflineList)]
+ //[InlineData(null, DatFormat.SabreXML)]
+ //[InlineData(null, DatFormat.OpenMSX)]
+ //[InlineData(null, DatFormat.ClrMamePro)]
+ //[InlineData(null, DatFormat.RomCenter)]
+ //[InlineData(null, DatFormat.DOSCenter)]
+ //[InlineData(null, DatFormat.AttractMode)]
+ //[InlineData(null, DatFormat.MissFile)] // Parsing is not supported
+ //[InlineData(null, DatFormat.CSV)]
+ //[InlineData(null, DatFormat.SSV)]
+ //[InlineData(null, DatFormat.TSV)]
+ //[InlineData(null, DatFormat.Listrom)]
+ [InlineData("test-smdb.txt", DatFormat.EverdriveSMDB)]
+ //[InlineData(null, DatFormat.SabreJSON)]
+ [InlineData("test-sfv.sfv", DatFormat.RedumpSFV)]
+ [InlineData("test-md5.md5", DatFormat.RedumpMD5)]
+ [InlineData("test-sha1.sha1", DatFormat.RedumpSHA1)]
+ [InlineData("test-sha256.sha256", DatFormat.RedumpSHA256)]
+ [InlineData("test-sha384.sha384", DatFormat.RedumpSHA384)]
+ [InlineData("test-sha512.sha512", DatFormat.RedumpSHA512)]
+ [InlineData("test-spamsum.spamsum", DatFormat.RedumpSpamSum)]
+ public void CreateAndParseTest(string filename, DatFormat datFormat)
+ {
+ // For all filenames, add the local path for test data
+ if (filename != null)
+ filename = Path.Combine(Environment.CurrentDirectory, "TestData", filename);
+
+ var datFile = Parser.CreateAndParse(filename);
+ Assert.Equal(datFormat, datFile.Header.DatFormat);
+ }
+ }
+}
\ No newline at end of file
diff --git a/SabreTools.Test/SabreTools.Test.csproj b/SabreTools.Test/SabreTools.Test.csproj
index a5271c9d..68766f14 100644
--- a/SabreTools.Test/SabreTools.Test.csproj
+++ b/SabreTools.Test/SabreTools.Test.csproj
@@ -9,12 +9,23 @@
+
+
+
+
+
+
+
+ Always
+
+
+
diff --git a/SabreTools.Test/TestData/test-md5.md5 b/SabreTools.Test/TestData/test-md5.md5
new file mode 100644
index 00000000..b1df167b
--- /dev/null
+++ b/SabreTools.Test/TestData/test-md5.md5
@@ -0,0 +1 @@
+d41d8cd98f00b204e9800998ecf8427e rom.bin
\ No newline at end of file
diff --git a/SabreTools.Test/TestData/test-sfv.sfv b/SabreTools.Test/TestData/test-sfv.sfv
new file mode 100644
index 00000000..3b60b66a
--- /dev/null
+++ b/SabreTools.Test/TestData/test-sfv.sfv
@@ -0,0 +1 @@
+rom.bin 00000000
\ No newline at end of file
diff --git a/SabreTools.Test/TestData/test-sha1.sha1 b/SabreTools.Test/TestData/test-sha1.sha1
new file mode 100644
index 00000000..8134a9ce
--- /dev/null
+++ b/SabreTools.Test/TestData/test-sha1.sha1
@@ -0,0 +1 @@
+da39a3ee5e6b4b0d3255bfef95601890afd80709 rom.bin
\ No newline at end of file
diff --git a/SabreTools.Test/TestData/test-sha256.sha256 b/SabreTools.Test/TestData/test-sha256.sha256
new file mode 100644
index 00000000..581bd42b
--- /dev/null
+++ b/SabreTools.Test/TestData/test-sha256.sha256
@@ -0,0 +1 @@
+ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad rom.bin
\ No newline at end of file
diff --git a/SabreTools.Test/TestData/test-sha384.sha384 b/SabreTools.Test/TestData/test-sha384.sha384
new file mode 100644
index 00000000..3ba642e9
--- /dev/null
+++ b/SabreTools.Test/TestData/test-sha384.sha384
@@ -0,0 +1 @@
+cb00753f45a35e8bb5a03d699ac65007272c32ab0eded1631a8b605a43ff5bed8086072ba1e7cc2358baeca134c825a7 rom.bin
\ No newline at end of file
diff --git a/SabreTools.Test/TestData/test-sha512.sha512 b/SabreTools.Test/TestData/test-sha512.sha512
new file mode 100644
index 00000000..ef32a510
--- /dev/null
+++ b/SabreTools.Test/TestData/test-sha512.sha512
@@ -0,0 +1 @@
+ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f rom.bin
\ No newline at end of file
diff --git a/SabreTools.Test/TestData/test-smdb.txt b/SabreTools.Test/TestData/test-smdb.txt
new file mode 100644
index 00000000..6fb56a14
--- /dev/null
+++ b/SabreTools.Test/TestData/test-smdb.txt
@@ -0,0 +1 @@
+ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad test/rom.bin da39a3ee5e6b4b0d3255bfef95601890afd80709 d41d8cd98f00b204e9800998ecf8427e 00000000
\ No newline at end of file
diff --git a/SabreTools.Test/TestData/test-spamsum.spamsum b/SabreTools.Test/TestData/test-spamsum.spamsum
new file mode 100644
index 00000000..f970f347
--- /dev/null
+++ b/SabreTools.Test/TestData/test-spamsum.spamsum
@@ -0,0 +1 @@
+QXX rom.bin
\ No newline at end of file