diff options
author | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2013-07-18 11:30:10 +0200 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2013-07-18 12:27:33 +0200 |
commit | cfda5af070ef3dff4f7a8cd638be9c1cb5519a82 (patch) | |
tree | ef00222b80d3c13b5f3fd9c23449ad15ac04d692 /shell | |
parent | 389f017ab17f9ebc613994b9af7c71f9219baf70 (diff) |
Trying to resurect the zip test
Change-Id: Ic022f25a4f8d69b8d60bea7974900db5223e1251
Diffstat (limited to 'shell')
-rw-r--r-- | shell/CppunitTest_shell_zip.mk | 44 | ||||
-rw-r--r-- | shell/Module_shell.mk | 4 | ||||
-rw-r--r-- | shell/qa/zip/ziptest.cxx | 16 |
3 files changed, 59 insertions, 5 deletions
diff --git a/shell/CppunitTest_shell_zip.mk b/shell/CppunitTest_shell_zip.mk new file mode 100644 index 000000000000..52f6d72d9e09 --- /dev/null +++ b/shell/CppunitTest_shell_zip.mk @@ -0,0 +1,44 @@ +# -*- 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: diff --git a/shell/Module_shell.mk b/shell/Module_shell.mk index ecd3772e31be..34613811244e 100644 --- a/shell/Module_shell.mk +++ b/shell/Module_shell.mk @@ -72,6 +72,10 @@ $(eval $(call gb_Module_add_targets,shell,\ StaticLibrary_xmlparser \ WinResTarget_shlxthdl \ )) + +$(eval $(call gb_Module_add_check_targets,shell,\ + CppunitTest_shell_zip \ +)) endif ifeq ($(BUILD_X64),TRUE) diff --git a/shell/qa/zip/ziptest.cxx b/shell/qa/zip/ziptest.cxx index bea0458e1222..457833afb2fd 100644 --- a/shell/qa/zip/ziptest.cxx +++ b/shell/qa/zip/ziptest.cxx @@ -45,9 +45,15 @@ public: CPPUNIT_TEST_SUITE_REGISTRATION(Test); -Test::Test() : - documentName("simpledocument.odt") +Test::Test() : documentName() { + const char* pSrcRoot = getenv( "SRC_ROOT" ); + if (pSrcRoot) + { + documentName.append(pSrcRoot); + documentName.append("/"); + } + documentName.append("shell/qa/zip/simpledocument.odt"); } void Test::test_directory() @@ -66,9 +72,9 @@ void Test::test_hasContentCaseInSensitive() void Test::test_getContent() { - TestZipImpl testImpl(documentName.c_str()); - bool isPassed = testImpl.test_getContent(); - CPPUNIT_ASSERT_MESSAGE("Couldn't receive content buffer form zipfile.", isPassed); + TestZipImpl testImpl(documentName.c_str()); + bool isPassed = testImpl.test_getContent(); + CPPUNIT_ASSERT_MESSAGE("Couldn't receive content buffer form zipfile.", isPassed); } CPPUNIT_PLUGIN_IMPLEMENT(); |