diff options
Diffstat (limited to 'package/qa')
-rw-r--r-- | package/qa/cppunit/data/fail/.gitignore | 0 | ||||
-rw-r--r-- | package/qa/cppunit/data/fail/EDB-29934-1.zip | bin | 0 -> 2009 bytes | |||
-rw-r--r-- | package/qa/cppunit/data/indeterminate/.gitignore | 0 | ||||
-rw-r--r-- | package/qa/cppunit/data/pass/.gitignore | 0 | ||||
-rw-r--r-- | package/qa/cppunit/test_package.cxx | 65 |
5 files changed, 65 insertions, 0 deletions
diff --git a/package/qa/cppunit/data/fail/.gitignore b/package/qa/cppunit/data/fail/.gitignore new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/package/qa/cppunit/data/fail/.gitignore diff --git a/package/qa/cppunit/data/fail/EDB-29934-1.zip b/package/qa/cppunit/data/fail/EDB-29934-1.zip Binary files differnew file mode 100644 index 000000000000..510e75eaa0a4 --- /dev/null +++ b/package/qa/cppunit/data/fail/EDB-29934-1.zip diff --git a/package/qa/cppunit/data/indeterminate/.gitignore b/package/qa/cppunit/data/indeterminate/.gitignore new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/package/qa/cppunit/data/indeterminate/.gitignore diff --git a/package/qa/cppunit/data/pass/.gitignore b/package/qa/cppunit/data/pass/.gitignore new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/package/qa/cppunit/data/pass/.gitignore diff --git a/package/qa/cppunit/test_package.cxx b/package/qa/cppunit/test_package.cxx new file mode 100644 index 000000000000..e10fc5051070 --- /dev/null +++ b/package/qa/cppunit/test_package.cxx @@ -0,0 +1,65 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include <comphelper/processfactory.hxx> +#include <unotest/filters-test.hxx> +#include <unotest/bootstrapfixturebase.hxx> +#include "com/sun/star/packages/zip/ZipFileAccess.hpp" + +using namespace ::com::sun::star; + +namespace +{ + class PackageTest + : public test::FiltersTest + , public test::BootstrapFixtureBase + { + public: + PackageTest() {} + + virtual bool load(const OUString &, + const OUString &rURL, const OUString &, + unsigned int, unsigned int, unsigned int); + + void test(); + + CPPUNIT_TEST_SUITE(PackageTest); + CPPUNIT_TEST(test); + CPPUNIT_TEST_SUITE_END(); + }; + + bool PackageTest::load(const OUString &, + const OUString &rURL, const OUString &, + unsigned int, unsigned int, unsigned int) + { + try + { + uno::Reference<css::packages::zip::XZipFileAccess2> xZip( + css::packages::zip::ZipFileAccess::createWithURL(comphelper::getProcessComponentContext(), rURL)); + return xZip.is(); + } + catch(...) + { + return false; + } + } + + void PackageTest::test() + { + testDir(OUString(), + getURLFromSrc("/package/qa/cppunit/data/"), + OUString()); + } + + CPPUNIT_TEST_SUITE_REGISTRATION(PackageTest); +} + +CPPUNIT_PLUGIN_IMPLEMENT(); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |