Kaydet (Commit) cfda5af0 authored tarafından Fridrich Štrba's avatar Fridrich Štrba

Trying to resurect the zip test

Change-Id: Ic022f25a4f8d69b8d60bea7974900db5223e1251
üst 389f017a
# -*- 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,zip))
$(eval $(call gb_CppunitTest_add_exception_objects,zip, \
shell/qa/zip/testimpl/testzipimpl \
shell/qa/zip/ziptest \
))
$(eval $(call gb_CppunitTest_set_include,zip,\
-I$(SRCDIR)/shell/inc \
$$(INCLUDE) \
))
$(eval $(call gb_CppunitTest_use_externals,zip,\
expat \
zlib \
))
$(eval $(call gb_CppunitTest_use_system_win32_libs,zip, \
advapi32 \
comctl32 \
kernel32 \
msvcprt \
oldnames \
ole32 \
shell32 \
uuid \
))
$(eval $(call gb_CppunitTest_use_static_libraries,zip,\
shell_xmlparser \
shlxthandler_common \
))
# vim: set noet sw=4 ts=4:
...@@ -72,6 +72,10 @@ $(eval $(call gb_Module_add_targets,shell,\ ...@@ -72,6 +72,10 @@ $(eval $(call gb_Module_add_targets,shell,\
StaticLibrary_xmlparser \ StaticLibrary_xmlparser \
WinResTarget_shlxthdl \ WinResTarget_shlxthdl \
)) ))
$(eval $(call gb_Module_add_check_targets,shell,\
CppunitTest_shell_zip \
))
endif endif
ifeq ($(BUILD_X64),TRUE) ifeq ($(BUILD_X64),TRUE)
......
...@@ -45,9 +45,15 @@ public: ...@@ -45,9 +45,15 @@ public:
CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_TEST_SUITE_REGISTRATION(Test);
Test::Test() : Test::Test() : documentName()
documentName("simpledocument.odt")
{ {
const char* pSrcRoot = getenv( "SRC_ROOT" );
if (pSrcRoot)
{
documentName.append(pSrcRoot);
documentName.append("/");
}
documentName.append("shell/qa/zip/simpledocument.odt");
} }
void Test::test_directory() void Test::test_directory()
...@@ -66,9 +72,9 @@ void Test::test_hasContentCaseInSensitive() ...@@ -66,9 +72,9 @@ void Test::test_hasContentCaseInSensitive()
void Test::test_getContent() void Test::test_getContent()
{ {
TestZipImpl testImpl(documentName.c_str()); TestZipImpl testImpl(documentName.c_str());
bool isPassed = testImpl.test_getContent(); bool isPassed = testImpl.test_getContent();
CPPUNIT_ASSERT_MESSAGE("Couldn't receive content buffer form zipfile.", isPassed); CPPUNIT_ASSERT_MESSAGE("Couldn't receive content buffer form zipfile.", isPassed);
} }
CPPUNIT_PLUGIN_IMPLEMENT(); CPPUNIT_PLUGIN_IMPLEMENT();
......
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