Hey,
normally I would not ask if we could add a test case to the 3-5 branch
but fdo#45171 seems to be a distro build problem and I hope that we
can prevent this problem in the 3-5 branch with this test case. If the
maintainer is executing subsequenttest after the build he will
immediately know if his build suffers from the same symptom and can
decide if he will investigate it or if he is happy with it.
The patch is safe and just uses a different file, but the idea is the
same as with the old testPassword case.
Regards,
Markus
From e3fc0e94f6244e8e5f8ac026ad18184f4f274d8b Mon Sep 17 00:00:00 2001
From: Markus Mohrhard markus.mohrh...@googlemail.com
Date: Tue, 21 Feb 2012 15:12:51 +0100
Subject: [PATCH] add test case for old password algorithm, related fdo#45171
---
sc/qa/unit/subsequent_filters-test.cxx | 22 ++
1 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index 9916584..101b981 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -171,7 +171,8 @@ public:
void testBugFixesXLSX();
//misc tests unrelated to the import filters
-void testPassword();
+void testPasswordNew();
+void testPasswordOld();
CPPUNIT_TEST_SUITE(ScFiltersTest);
CPPUNIT_TEST(testRangeName);
@@ -185,7 +186,8 @@ public:
//disable testPassword on MacOSX due to problems with libsqlite3
//also crashes on DragonFly due to problems with nss/nspr headers
#if !defined(MACOSX) !defined(DRAGONFLY)
-CPPUNIT_TEST(testPassword);
+CPPUNIT_TEST(testPasswordNew);
+CPPUNIT_TEST(testPasswordOld);
#endif
#if TEST_BUG_FILES
@@ -196,6 +198,7 @@ public:
CPPUNIT_TEST_SUITE_END();
private:
+void testPassword_Impl(const rtl::OUString aFileNameBase);
uno::Referenceuno::XInterface m_xCalcComponent;
::rtl::OUString m_aBaseString;
};
@@ -544,9 +547,8 @@ void ScFiltersTest::testBugFixesXLSX()
xDocSh-DoClose();
}
-void ScFiltersTest::testPassword()
+void ScFiltersTest::testPassword_Impl(const rtl::OUString aFileNameBase)
{
-const rtl::OUString aFileNameBase(RTL_CONSTASCII_USTRINGPARAM(password.));
rtl::OUString aFileExtension(aFileFormats[0].pName, strlen(aFileFormats[0].pName), RTL_TEXTENCODING_UTF8 );
rtl::OUString aFilterName(aFileFormats[0].pFilterName, strlen(aFileFormats[0].pFilterName), RTL_TEXTENCODING_UTF8) ;
rtl::OUString aFileName;
@@ -579,6 +581,18 @@ void ScFiltersTest::testPassword()
xDocSh-DoClose();
}
+void ScFiltersTest::testPasswordNew()
+{
+const rtl::OUString aFileNameBase(RTL_CONSTASCII_USTRINGPARAM(password.));
+testPassword_Impl(aFileNameBase);
+}
+
+void ScFiltersTest::testPasswordOld()
+{
+const rtl::OUString aFileNameBase(RTL_CONSTASCII_USTRINGPARAM(passwordOld.));
+testPassword_Impl(aFileNameBase);
+}
+
ScFiltersTest::ScFiltersTest()
: m_aBaseString(RTL_CONSTASCII_USTRINGPARAM(/sc/qa/unit/data))
{
--
1.7.7
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice