Kaydet (Commit) 0445a0ea authored tarafından Caolán McNamara's avatar Caolán McNamara

add a regression test for .met files

OS/2 Metafile Format

aka

Presentation Manager Metafile File Format

this format appears to not to have a mime-type

Change-Id: I8b2356fb42272a6e0550abf09f46b051d22b64a5
üst 11a514e0
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# 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/.
#
$(eval $(call gb_CppunitTest_CppunitTest,filter_met_test))
$(eval $(call gb_CppunitTest_use_external,filter_met_test,boost_headers))
$(eval $(call gb_CppunitTest_add_exception_objects,filter_met_test, \
filter/qa/cppunit/filters-met-test \
))
$(eval $(call gb_CppunitTest_use_libraries,filter_met_test, \
ime \
sal \
test \
tl \
unotest \
vcl \
$(gb_UWINAPI) \
))
$(eval $(call gb_CppunitTest_use_api,filter_met_test,\
udkapi \
offapi \
))
$(eval $(call gb_CppunitTest_use_ure,filter_met_test))
$(eval $(call gb_CppunitTest_use_vcl,filter_met_test))
$(eval $(call gb_CppunitTest_use_components,filter_met_test,\
configmgr/source/configmgr \
i18npool/util/i18npool \
))
$(eval $(call gb_CppunitTest_use_configuration,filter_met_test))
# vim: set noet sw=4 ts=4:
......@@ -86,6 +86,7 @@ $(eval $(call gb_Module_add_check_targets,filter,\
ifneq ($(DISABLE_CVE_TESTS),TRUE)
$(eval $(call gb_Module_add_check_targets,filter,\
CppunitTest_filter_dxf_test \
CppunitTest_filter_met_test \
CppunitTest_filter_pcx_test \
CppunitTest_filter_pict_test \
CppunitTest_filter_ppm_test \
......
/* -*- 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 <unotest/filters-test.hxx>
#include <test/bootstrapfixture.hxx>
#include <vcl/FilterConfigItem.hxx>
#include <tools/stream.hxx>
#include <vcl/graph.hxx>
#include <osl/file.hxx>
#include <osl/process.h>
extern "C"
{
SAL_DLLPUBLIC_EXPORT bool SAL_CALL
GraphicImport(SvStream & rStream, Graphic & rGraphic,
FilterConfigItem*);
}
using namespace ::com::sun::star;
/* Implementation of Filters test */
class MetFilterTest
: public test::FiltersTest
, public test::BootstrapFixture
{
public:
MetFilterTest() : BootstrapFixture(true, false) {}
virtual bool load(const OUString &,
const OUString &rURL, const OUString &,
unsigned int, unsigned int, unsigned int) SAL_OVERRIDE;
/**
* Ensure CVEs remain unbroken
*/
void testCVEs();
CPPUNIT_TEST_SUITE(MetFilterTest);
CPPUNIT_TEST(testCVEs);
CPPUNIT_TEST_SUITE_END();
};
bool MetFilterTest::load(const OUString &,
const OUString &rURL, const OUString &,
unsigned int, unsigned int, unsigned int)
{
SvFileStream aFileStream(rURL, STREAM_READ);
Graphic aGraphic;
return GraphicImport(aFileStream, aGraphic, NULL);
}
void MetFilterTest::testCVEs()
{
testDir(OUString(),
getURLFromSrc("/filter/qa/cppunit/data/met/"),
OUString());
}
CPPUNIT_TEST_SUITE_REGISTRATION(MetFilterTest);
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment