mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-21 20:54:35 +02:00
Fix 'make check-coverage' for VPATH builds.
This commit is contained in:
parent
22823c966b
commit
09d97c551e
@ -68,7 +68,7 @@ check-coverage: all
|
|||||||
lcov -d . -z
|
lcov -d . -z
|
||||||
make check
|
make check
|
||||||
lcov -d . -c -o icinga2.info
|
lcov -d . -c -o icinga2.info
|
||||||
lcov -e icinga2.info -o icinga2-filtered.info `pwd`\*
|
lcov -e icinga2.info -o icinga2-filtered.info "`readlink -f $(top_srcdir)`/*"
|
||||||
mkdir -p docs/lcov
|
mkdir -p docs/lcov
|
||||||
genhtml -o docs/lcov icinga2-filtered.info
|
genhtml -o docs/lcov icinga2-filtered.info
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@ icinga2_test_SOURCES = \
|
|||||||
base-convert.cpp \
|
base-convert.cpp \
|
||||||
base-dictionary.cpp \
|
base-dictionary.cpp \
|
||||||
base-fifo.cpp \
|
base-fifo.cpp \
|
||||||
|
base-match.cpp \
|
||||||
base-object.cpp \
|
base-object.cpp \
|
||||||
base-shellescape.cpp \
|
base-shellescape.cpp \
|
||||||
base-timer.cpp
|
base-timer.cpp
|
||||||
|
36
test/base-match.cpp
Normal file
36
test/base-match.cpp
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* Icinga 2 *
|
||||||
|
* Copyright (C) 2012 Icinga Development Team (http://www.icinga.org/) *
|
||||||
|
* *
|
||||||
|
* This program is free software; you can redistribute it and/or *
|
||||||
|
* modify it under the terms of the GNU General Public License *
|
||||||
|
* as published by the Free Software Foundation; either version 2 *
|
||||||
|
* of the License, or (at your option) any later version. *
|
||||||
|
* *
|
||||||
|
* This program is distributed in the hope that it will be useful, *
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||||
|
* GNU General Public License for more details. *
|
||||||
|
* *
|
||||||
|
* You should have received a copy of the GNU General Public License *
|
||||||
|
* along with this program; if not, write to the Free Software Foundation *
|
||||||
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
#include "base/utility.h"
|
||||||
|
#include <boost/test/unit_test.hpp>
|
||||||
|
|
||||||
|
using namespace icinga;
|
||||||
|
|
||||||
|
BOOST_AUTO_TEST_SUITE(base_match)
|
||||||
|
|
||||||
|
BOOST_AUTO_TEST_CASE(tolong)
|
||||||
|
{
|
||||||
|
BOOST_CHECK(Utility::Match("*", "hello"));
|
||||||
|
BOOST_CHECK(!Utility::Match("world", "hello"));
|
||||||
|
BOOST_CHECK(!Utility::Match("hee*", "hello"));
|
||||||
|
BOOST_CHECK(Utility::Match("he??o", "hello"));
|
||||||
|
BOOST_CHECK(Utility::Match("he?", "hel"));
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOST_AUTO_TEST_SUITE_END()
|
Loading…
x
Reference in New Issue
Block a user