mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 04:22:34 +03:00
Added test for checking if library is independ to $(topsrcdir)/src
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This commit is contained in:
parent
06f99484de
commit
994254917c
@ -602,6 +602,14 @@ intl/Makefile
|
|||||||
po/Makefile.in
|
po/Makefile.in
|
||||||
])
|
])
|
||||||
|
|
||||||
|
if test x$enable_tests != xno; then
|
||||||
|
AC_CONFIG_FILES([
|
||||||
|
lib/tests/Makefile
|
||||||
|
])
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
SUBDIRS = event filehighlight mcconfig search skin tty vfs strutil widget
|
SUBDIRS = event filehighlight mcconfig search skin tty vfs strutil widget .
|
||||||
|
|
||||||
|
if HAVE_TESTS
|
||||||
|
SUBDIRS += tests
|
||||||
|
endif
|
||||||
|
|
||||||
if ENABLE_MCLIB
|
if ENABLE_MCLIB
|
||||||
LIB_VERSION=`echo $(LIBMC_VERSION) | \
|
LIB_VERSION=`echo $(LIBMC_VERSION) | \
|
||||||
|
10
lib/tests/Makefile.am
Normal file
10
lib/tests/Makefile.am
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
AM_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) @CHECK_CFLAGS@
|
||||||
|
LIBS=@CHECK_LIBS@ $(top_builddir)/lib/libmc.la
|
||||||
|
|
||||||
|
TESTS = \
|
||||||
|
library_independ
|
||||||
|
|
||||||
|
check_PROGRAMS = $(TESTS)
|
||||||
|
|
||||||
|
library_independ_SOURCES = \
|
||||||
|
library_independ.c
|
59
lib/tests/library_independ.c
Normal file
59
lib/tests/library_independ.c
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
/* libmc - check if library is independ to $(topsrc)/src directory
|
||||||
|
|
||||||
|
Copyright (C) 2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
Written by:
|
||||||
|
Slava Zanko <slavazanko@gmail.com>, 2011
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Library 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 Library General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Library General Public
|
||||||
|
License along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define TEST_SUITE_NAME "lib/library_independ"
|
||||||
|
|
||||||
|
#include <check.h>
|
||||||
|
|
||||||
|
#include "lib/global.h"
|
||||||
|
|
||||||
|
/* --------------------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
START_TEST (test_library_independ)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
END_TEST
|
||||||
|
|
||||||
|
/* --------------------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
int
|
||||||
|
main (void)
|
||||||
|
{
|
||||||
|
int number_failed;
|
||||||
|
|
||||||
|
Suite *s = suite_create (TEST_SUITE_NAME);
|
||||||
|
TCase *tc_core = tcase_create ("Core");
|
||||||
|
SRunner *sr;
|
||||||
|
|
||||||
|
/* Add new tests here: *************** */
|
||||||
|
tcase_add_test (tc_core, test_library_independ);
|
||||||
|
/* *********************************** */
|
||||||
|
|
||||||
|
suite_add_tcase (s, tc_core);
|
||||||
|
sr = srunner_create (s);
|
||||||
|
srunner_run_all (sr, CK_NORMAL);
|
||||||
|
number_failed = srunner_ntests_failed (sr);
|
||||||
|
srunner_free (sr);
|
||||||
|
return (number_failed == 0) ? 0 : 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* --------------------------------------------------------------------------------------------- */
|
Loading…
Reference in New Issue
Block a user