From 770ebafa02d50595514a16bf375e37b3da45db48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Kowalik?= Date: Sat, 9 Nov 2024 13:00:15 +0100 Subject: [PATCH] test: added example of docx that does not match current magic numbers --- .../FileTypeChecker.Tests.csproj | 3 +++ FileTypeChecker.Tests/FileTypeValidatorTests.cs | 1 + FileTypeChecker.Tests/files/365-issue311.docx | Bin 0 -> 3770 bytes 3 files changed, 4 insertions(+) create mode 100644 FileTypeChecker.Tests/files/365-issue311.docx diff --git a/FileTypeChecker.Tests/FileTypeChecker.Tests.csproj b/FileTypeChecker.Tests/FileTypeChecker.Tests.csproj index 36876c8..d6f99ac 100644 --- a/FileTypeChecker.Tests/FileTypeChecker.Tests.csproj +++ b/FileTypeChecker.Tests/FileTypeChecker.Tests.csproj @@ -113,6 +113,9 @@ Always + + Always + PreserveNewest diff --git a/FileTypeChecker.Tests/FileTypeValidatorTests.cs b/FileTypeChecker.Tests/FileTypeValidatorTests.cs index 3946cfe..86f026c 100644 --- a/FileTypeChecker.Tests/FileTypeValidatorTests.cs +++ b/FileTypeChecker.Tests/FileTypeValidatorTests.cs @@ -257,6 +257,7 @@ public void Is_ShouldReturnFalseIfTypesDidNotMatch() [TestCase("test.ico", typeof(Icon))] [TestCase("365-doc.docx", typeof(MicrosoftOffice365Document))] [TestCase("365-doc-empty.docx", typeof(MicrosoftOffice365Document))] + [TestCase("365-issue311.docx", typeof(MicrosoftOffice365Document))] [TestCase("testwin10.zip", typeof(ZipFile))] [TestCase("test.webp", typeof(Webp))] [TestCase("sample.heic", typeof(HighEfficiencyImageFile))] diff --git a/FileTypeChecker.Tests/files/365-issue311.docx b/FileTypeChecker.Tests/files/365-issue311.docx new file mode 100644 index 0000000000000000000000000000000000000000..e4328ec3ae9d696d3ac338f36fffecb1d550179c GIT binary patch literal 3770 zcmaJ^2{e>#8y<``F_y?uw(Q1UWSPcblC42Rma)g!nLcaDzEz(+kv(e>Vw9o`gUT-1 zLda5<${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