libreoffice/0001-disable-tests-that-don-t-work-without-pdfium.patch

62 lines
2.6 KiB
Diff
Raw Normal View History

From 5597567fbecbb62cdc9e64e68b9fe9bf23e032a6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Fri, 4 Dec 2020 12:58:20 +0000
Subject: [PATCH] disable tests that don't work without pdfium
we're probably past the end of the road on --disable-pdfium
Change-Id: Id91ea6c77bbdb3ecf609a7ffd16a278eb3b17e91
---
xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
index 7659fe9485c5..68738134cc36 100644
--- a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
+++ b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
@@ -7,6 +7,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#include <config_features.h>
+
#include <com/sun/star/xml/crypto/SEInitializer.hpp>
#include <com/sun/star/security/DocumentSignatureInformation.hpp>
@@ -414,6 +416,7 @@ CPPUNIT_TEST_FIXTURE(PDFSigningTest, testBadCertP1)
= verify(m_directories.getURLFromSrc(DATA_DIRECTORY) + "bad-cert-p1.pdf", 1,
/*rExpectedSubFilter=*/OString());
CPPUNIT_ASSERT(!aInfos.empty());
+#if HAVE_FEATURE_PDFIUM
SignatureInformation& rInformation = aInfos[0];
// Without the accompanying fix in place, this test would have failed with:
// - Expected: 0 (SecurityOperationStatus_UNKNOWN)
@@ -421,6 +424,7 @@ CPPUNIT_TEST_FIXTURE(PDFSigningTest, testBadCertP1)
// i.e. annotation after a P1 signature was not considered as a bad modification.
CPPUNIT_ASSERT_EQUAL(xml::crypto::SecurityOperationStatus::SecurityOperationStatus_UNKNOWN,
rInformation.nStatus);
+#endif
}
CPPUNIT_TEST_FIXTURE(PDFSigningTest, testBadCertP3Stamp)
@@ -429,14 +433,15 @@ CPPUNIT_TEST_FIXTURE(PDFSigningTest, testBadCertP3Stamp)
= verify(m_directories.getURLFromSrc(DATA_DIRECTORY) + "bad-cert-p3-stamp.pdf", 1,
/*rExpectedSubFilter=*/OString());
CPPUNIT_ASSERT(!aInfos.empty());
+#if HAVE_FEATURE_PDFIUM
SignatureInformation& rInformation = aInfos[0];
-
// Without the accompanying fix in place, this test would have failed with:
// - Expected: 0 (SecurityOperationStatus_UNKNOWN)
// - Actual : 1 (SecurityOperationStatus_OPERATION_SUCCEEDED)
// i.e. adding a stamp annotation was not considered as a bad modification.
CPPUNIT_ASSERT_EQUAL(xml::crypto::SecurityOperationStatus::SecurityOperationStatus_UNKNOWN,
rInformation.nStatus);
+#endif
}
/// Test writing a PAdES signature.
--
2.28.0