Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
3e28dff9
Kaydet (Commit)
3e28dff9
authored
Nis 17, 2014
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
add regression tests for psd filter
Change-Id: Ia9b34bc3b77902f8edbc0e7040da5edd02e02879
üst
06abff6c
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
120 additions
and
6 deletions
+120
-6
CppunitTest_filter_psd_test.mk
filter/CppunitTest_filter_psd_test.mk
+41
-0
Module_filter.mk
filter/Module_filter.mk
+1
-0
.gitignore
filter/qa/cppunit/data/psd/fail/.gitignore
+0
-0
CVE-2007-3741-1.psd
filter/qa/cppunit/data/psd/fail/CVE-2007-3741-1.psd
+0
-0
.gitignore
filter/qa/cppunit/data/psd/indeterminate/.gitignore
+1
-0
.gitignore
filter/qa/cppunit/data/psd/pass/.gitignore
+0
-0
rhbz899670-1.psd
filter/qa/cppunit/data/psd/pass/rhbz899670-1.psd
+0
-0
filters-pcx-test.cxx
filter/qa/cppunit/filters-pcx-test.cxx
+6
-6
filters-psd-test.cxx
filter/qa/cppunit/filters-psd-test.cxx
+71
-0
No files found.
filter/CppunitTest_filter_psd_test.mk
0 → 100644
Dosyayı görüntüle @
3e28dff9
# -*- 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_psd_test))
$(eval $(call gb_CppunitTest_use_external,filter_psd_test,boost_headers))
$(eval $(call gb_CppunitTest_add_exception_objects,filter_psd_test, \
filter/qa/cppunit/filters-psd-test \
))
$(eval $(call gb_CppunitTest_use_libraries,filter_psd_test, \
ipd \
sal \
test \
tl \
unotest \
vcl \
$(gb_UWINAPI) \
))
$(eval $(call gb_CppunitTest_use_api,filter_psd_test,\
udkapi \
offapi \
))
$(eval $(call gb_CppunitTest_use_ure,filter_psd_test))
$(eval $(call gb_CppunitTest_use_components,filter_psd_test,\
configmgr/source/configmgr \
))
$(eval $(call gb_CppunitTest_use_configuration,filter_psd_test))
# vim: set noet sw=4 ts=4:
filter/Module_filter.mk
Dosyayı görüntüle @
3e28dff9
...
@@ -85,6 +85,7 @@ ifneq ($(DISABLE_CVE_TESTS),TRUE)
...
@@ -85,6 +85,7 @@ ifneq ($(DISABLE_CVE_TESTS),TRUE)
$(eval $(call gb_Module_add_check_targets,filter,\
$(eval $(call gb_Module_add_check_targets,filter,\
CppunitTest_filter_pcx_test \
CppunitTest_filter_pcx_test \
CppunitTest_filter_pict_test \
CppunitTest_filter_pict_test \
CppunitTest_filter_psd_test \
CppunitTest_filter_ras_test \
CppunitTest_filter_ras_test \
CppunitTest_filter_tiff_test \
CppunitTest_filter_tiff_test \
CppunitTest_filter_tga_test \
CppunitTest_filter_tga_test \
...
...
filter/qa/cppunit/data/psd/fail/.gitignore
0 → 100644
Dosyayı görüntüle @
3e28dff9
filter/qa/cppunit/data/psd/fail/CVE-2007-3741-1.psd
0 → 100644
Dosyayı görüntüle @
3e28dff9
File added
filter/qa/cppunit/data/psd/indeterminate/.gitignore
0 → 100644
Dosyayı görüntüle @
3e28dff9
*.wmf-*
filter/qa/cppunit/data/psd/pass/.gitignore
0 → 100644
Dosyayı görüntüle @
3e28dff9
filter/qa/cppunit/data/psd/pass/rhbz899670-1.psd
0 → 100644
Dosyayı görüntüle @
3e28dff9
File added
filter/qa/cppunit/filters-pcx-test.cxx
Dosyayı görüntüle @
3e28dff9
...
@@ -27,12 +27,12 @@ using namespace ::com::sun::star;
...
@@ -27,12 +27,12 @@ using namespace ::com::sun::star;
/* Implementation of Filters test */
/* Implementation of Filters test */
class
Ras
FilterTest
class
Pcx
FilterTest
:
public
test
::
FiltersTest
:
public
test
::
FiltersTest
,
public
test
::
BootstrapFixture
,
public
test
::
BootstrapFixture
{
{
public
:
public
:
Ras
FilterTest
()
:
BootstrapFixture
(
true
,
false
)
{}
Pcx
FilterTest
()
:
BootstrapFixture
(
true
,
false
)
{}
virtual
bool
load
(
const
OUString
&
,
virtual
bool
load
(
const
OUString
&
,
const
OUString
&
rURL
,
const
OUString
&
,
const
OUString
&
rURL
,
const
OUString
&
,
...
@@ -43,12 +43,12 @@ public:
...
@@ -43,12 +43,12 @@ public:
*/
*/
void
testCVEs
();
void
testCVEs
();
CPPUNIT_TEST_SUITE
(
Ras
FilterTest
);
CPPUNIT_TEST_SUITE
(
Pcx
FilterTest
);
CPPUNIT_TEST
(
testCVEs
);
CPPUNIT_TEST
(
testCVEs
);
CPPUNIT_TEST_SUITE_END
();
CPPUNIT_TEST_SUITE_END
();
};
};
bool
Ras
FilterTest
::
load
(
const
OUString
&
,
bool
Pcx
FilterTest
::
load
(
const
OUString
&
,
const
OUString
&
rURL
,
const
OUString
&
,
const
OUString
&
rURL
,
const
OUString
&
,
unsigned
int
,
unsigned
int
,
unsigned
int
)
unsigned
int
,
unsigned
int
,
unsigned
int
)
{
{
...
@@ -57,14 +57,14 @@ bool RasFilterTest::load(const OUString &,
...
@@ -57,14 +57,14 @@ bool RasFilterTest::load(const OUString &,
return
GraphicImport
(
aFileStream
,
aGraphic
,
NULL
);
return
GraphicImport
(
aFileStream
,
aGraphic
,
NULL
);
}
}
void
Ras
FilterTest
::
testCVEs
()
void
Pcx
FilterTest
::
testCVEs
()
{
{
testDir
(
OUString
(),
testDir
(
OUString
(),
getURLFromSrc
(
"/filter/qa/cppunit/data/pcx/"
),
getURLFromSrc
(
"/filter/qa/cppunit/data/pcx/"
),
OUString
());
OUString
());
}
}
CPPUNIT_TEST_SUITE_REGISTRATION
(
Ras
FilterTest
);
CPPUNIT_TEST_SUITE_REGISTRATION
(
Pcx
FilterTest
);
CPPUNIT_PLUGIN_IMPLEMENT
();
CPPUNIT_PLUGIN_IMPLEMENT
();
...
...
filter/qa/cppunit/filters-psd-test.cxx
0 → 100644
Dosyayı görüntüle @
3e28dff9
/* -*- 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
PsdFilterTest
:
public
test
::
FiltersTest
,
public
test
::
BootstrapFixture
{
public
:
PsdFilterTest
()
:
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
(
PsdFilterTest
);
CPPUNIT_TEST
(
testCVEs
);
CPPUNIT_TEST_SUITE_END
();
};
bool
PsdFilterTest
::
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
PsdFilterTest
::
testCVEs
()
{
testDir
(
OUString
(),
getURLFromSrc
(
"/filter/qa/cppunit/data/psd/"
),
OUString
());
}
CPPUNIT_TEST_SUITE_REGISTRATION
(
PsdFilterTest
);
CPPUNIT_PLUGIN_IMPLEMENT
();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment