Imported Upstream version 1.4.12
This commit is contained in:
parent
1d1585cd09
commit
4ab9f0d24c
291 changed files with 27277 additions and 11364 deletions
|
@ -7,9 +7,11 @@ check_PROGRAMS = @EXTRA_TEST@
|
|||
|
||||
INCLUDES = -I$(top_srcdir)/lib -I$(top_srcdir)/gl -I$(top_srcdir)/intl -I$(top_srcdir)/plugins
|
||||
|
||||
EXTRA_PROGRAMS = test_utils test_disk test_tcp test_cmd test_base64
|
||||
EXTRA_PROGRAMS = test_utils test_disk test_tcp test_cmd test_base64 test_ini test_opts
|
||||
|
||||
EXTRA_DIST = test_utils.t test_disk.t test_tcp.t test_cmd.t test_base64.t
|
||||
np_test_scripts = test_base64.t test_cmd.t test_disk.t test_ini.t test_opts.t test_tcp.t test_utils.t
|
||||
np_test_files = config-dos.ini config-opts.ini config-tiny.ini plugin.ini plugins.ini
|
||||
EXTRA_DIST = $(np_test_scripts) $(np_test_files)
|
||||
|
||||
LIBS = @LIBINTL@
|
||||
|
||||
|
@ -36,7 +38,17 @@ test_cmd_LDADD = ../utils_cmd.o ../utils_base.o
|
|||
test_base64_SOURCES = test_base64.c
|
||||
test_base64_CFLAGS = -g -I..
|
||||
test_base64_LDFLAGS = -L/usr/local/lib -ltap
|
||||
test_base64_LDADD = ../base64.o
|
||||
test_base64_LDADD = $(top_srcdir)/gl/base64.o
|
||||
|
||||
test_ini_SOURCES = test_ini.c
|
||||
test_ini_CFLAGS = -g -I..
|
||||
test_ini_LDFLAGS = -L/usr/local/lib -ltap
|
||||
test_ini_LDADD = ../utils_base.o ../parse_ini.o
|
||||
|
||||
test_opts_SOURCES = test_opts.c
|
||||
test_opts_CFLAGS = -g -I..
|
||||
test_opts_LDFLAGS = -L/usr/local/lib -ltap
|
||||
test_opts_LDADD = ../utils_base.o ../parse_ini.o ../extra_opts.o
|
||||
|
||||
test: ${noinst_PROGRAMS}
|
||||
perl -MTest::Harness -e '$$Test::Harness::switches=""; runtests(map {$$_ .= ".t"} @ARGV)' $(EXTRA_PROGRAMS)
|
||||
|
|
|
@ -38,41 +38,46 @@ host_triplet = @host@
|
|||
noinst_PROGRAMS = @EXTRA_TEST@
|
||||
check_PROGRAMS = @EXTRA_TEST@
|
||||
EXTRA_PROGRAMS = test_utils$(EXEEXT) test_disk$(EXEEXT) \
|
||||
test_tcp$(EXEEXT) test_cmd$(EXEEXT) test_base64$(EXEEXT)
|
||||
test_tcp$(EXEEXT) test_cmd$(EXEEXT) test_base64$(EXEEXT) \
|
||||
test_ini$(EXEEXT) test_opts$(EXEEXT)
|
||||
subdir = lib/tests
|
||||
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/np_mysqlclient.m4 \
|
||||
$(top_srcdir)/gl/m4/absolute-header.m4 \
|
||||
$(top_srcdir)/gl/m4/alloca.m4 \
|
||||
$(top_srcdir)/gl/m4/arpa_inet_h.m4 \
|
||||
$(top_srcdir)/gl/m4/c-strtod.m4 $(top_srcdir)/gl/m4/cloexec.m4 \
|
||||
$(top_srcdir)/gl/m4/codeset.m4 $(top_srcdir)/gl/m4/dirname.m4 \
|
||||
$(top_srcdir)/gl/m4/dos.m4 \
|
||||
$(top_srcdir)/gl/m4/base64.m4 $(top_srcdir)/gl/m4/c-strtod.m4 \
|
||||
$(top_srcdir)/gl/m4/cloexec.m4 $(top_srcdir)/gl/m4/codeset.m4 \
|
||||
$(top_srcdir)/gl/m4/dirname.m4 $(top_srcdir)/gl/m4/dos.m4 \
|
||||
$(top_srcdir)/gl/m4/double-slash-root.m4 \
|
||||
$(top_srcdir)/gl/m4/eoverflow.m4 $(top_srcdir)/gl/m4/error.m4 \
|
||||
$(top_srcdir)/gl/m4/exitfail.m4 \
|
||||
$(top_srcdir)/gl/m4/extensions.m4 \
|
||||
$(top_srcdir)/gl/m4/fcntl-safer.m4 \
|
||||
$(top_srcdir)/gl/m4/float_h.m4 $(top_srcdir)/gl/m4/floorf.m4 \
|
||||
$(top_srcdir)/gl/m4/fstypename.m4 \
|
||||
$(top_srcdir)/gl/m4/fsusage.m4 \
|
||||
$(top_srcdir)/gl/m4/getaddrinfo.m4 \
|
||||
$(top_srcdir)/gl/m4/gethostname.m4 \
|
||||
$(top_srcdir)/gl/m4/getloadavg.m4 \
|
||||
$(top_srcdir)/gl/m4/getopt.m4 $(top_srcdir)/gl/m4/gettext.m4 \
|
||||
$(top_srcdir)/gl/m4/glibc21.m4 \
|
||||
$(top_srcdir)/gl/m4/gnulib-common.m4 \
|
||||
$(top_srcdir)/gl/m4/gnulib-comp.m4 \
|
||||
$(top_srcdir)/gl/m4/iconv.m4 $(top_srcdir)/gl/m4/inet_ntop.m4 \
|
||||
$(top_srcdir)/gl/m4/inline.m4 $(top_srcdir)/gl/m4/intmax_t.m4 \
|
||||
$(top_srcdir)/gl/m4/iconv.m4 \
|
||||
$(top_srcdir)/gl/m4/include_next.m4 \
|
||||
$(top_srcdir)/gl/m4/inet_ntop.m4 $(top_srcdir)/gl/m4/inline.m4 \
|
||||
$(top_srcdir)/gl/m4/intlmacosx.m4 \
|
||||
$(top_srcdir)/gl/m4/intmax_t.m4 \
|
||||
$(top_srcdir)/gl/m4/inttypes_h.m4 \
|
||||
$(top_srcdir)/gl/m4/lib-ld.m4 $(top_srcdir)/gl/m4/lib-link.m4 \
|
||||
$(top_srcdir)/gl/m4/lib-prefix.m4 $(top_srcdir)/gl/m4/lock.m4 \
|
||||
$(top_srcdir)/gl/m4/longdouble.m4 \
|
||||
$(top_srcdir)/gl/m4/lib-prefix.m4 \
|
||||
$(top_srcdir)/gl/m4/localcharset.m4 \
|
||||
$(top_srcdir)/gl/m4/longlong.m4 \
|
||||
$(top_srcdir)/gl/m4/ls-mntd-fs.m4 \
|
||||
$(top_srcdir)/gl/m4/mbchar.m4 $(top_srcdir)/gl/m4/mbiter.m4 \
|
||||
$(top_srcdir)/gl/m4/mbrtowc.m4 $(top_srcdir)/gl/m4/memchr.m4 \
|
||||
$(top_srcdir)/gl/m4/minmax.m4 $(top_srcdir)/gl/m4/mountlist.m4 \
|
||||
$(top_srcdir)/gl/m4/malloc.m4 $(top_srcdir)/gl/m4/math_h.m4 \
|
||||
$(top_srcdir)/gl/m4/mbstate_t.m4 \
|
||||
$(top_srcdir)/gl/m4/mountlist.m4 \
|
||||
$(top_srcdir)/gl/m4/netinet_in_h.m4 $(top_srcdir)/gl/m4/nls.m4 \
|
||||
$(top_srcdir)/gl/m4/onceonly_2_57.m4 $(top_srcdir)/gl/m4/po.m4 \
|
||||
$(top_srcdir)/gl/m4/progtest.m4 $(top_srcdir)/gl/m4/regex.m4 \
|
||||
|
@ -82,21 +87,21 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/np_mysqlclient.m4 \
|
|||
$(top_srcdir)/gl/m4/snprintf.m4 $(top_srcdir)/gl/m4/socklen.m4 \
|
||||
$(top_srcdir)/gl/m4/sockpfaf.m4 $(top_srcdir)/gl/m4/ssize_t.m4 \
|
||||
$(top_srcdir)/gl/m4/stdbool.m4 $(top_srcdir)/gl/m4/stdint.m4 \
|
||||
$(top_srcdir)/gl/m4/stdint_h.m4 $(top_srcdir)/gl/m4/strcase.m4 \
|
||||
$(top_srcdir)/gl/m4/strdup.m4 $(top_srcdir)/gl/m4/strndup.m4 \
|
||||
$(top_srcdir)/gl/m4/stdint_h.m4 $(top_srcdir)/gl/m4/stdio_h.m4 \
|
||||
$(top_srcdir)/gl/m4/stdlib_h.m4 $(top_srcdir)/gl/m4/strdup.m4 \
|
||||
$(top_srcdir)/gl/m4/strerror.m4 \
|
||||
$(top_srcdir)/gl/m4/string_h.m4 $(top_srcdir)/gl/m4/strndup.m4 \
|
||||
$(top_srcdir)/gl/m4/strnlen.m4 \
|
||||
$(top_srcdir)/gl/m4/sys_socket_h.m4 \
|
||||
$(top_srcdir)/gl/m4/ulonglong.m4 \
|
||||
$(top_srcdir)/gl/m4/unistd-safer.m4 \
|
||||
$(top_srcdir)/gl/m4/unistd_h.m4 \
|
||||
$(top_srcdir)/gl/m4/vasnprintf.m4 \
|
||||
$(top_srcdir)/gl/m4/vasprintf.m4 \
|
||||
$(top_srcdir)/gl/m4/vsnprintf.m4 $(top_srcdir)/gl/m4/wchar.m4 \
|
||||
$(top_srcdir)/gl/m4/wchar_t.m4 $(top_srcdir)/gl/m4/wctype.m4 \
|
||||
$(top_srcdir)/gl/m4/wcwidth.m4 $(top_srcdir)/gl/m4/wint_t.m4 \
|
||||
$(top_srcdir)/gl/m4/xalloc.m4 $(top_srcdir)/gl/m4/xsize.m4 \
|
||||
$(top_srcdir)/gl/m4/xstrndup.m4 $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.in
|
||||
$(top_srcdir)/gl/m4/wint_t.m4 $(top_srcdir)/gl/m4/xalloc.m4 \
|
||||
$(top_srcdir)/gl/m4/xsize.m4 $(top_srcdir)/gl/m4/xstrndup.m4 \
|
||||
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs
|
||||
|
@ -105,13 +110,20 @@ CONFIG_CLEAN_FILES =
|
|||
PROGRAMS = $(noinst_PROGRAMS)
|
||||
am_test_base64_OBJECTS = test_base64-test_base64.$(OBJEXT)
|
||||
test_base64_OBJECTS = $(am_test_base64_OBJECTS)
|
||||
test_base64_DEPENDENCIES = ../base64.o
|
||||
test_base64_DEPENDENCIES = $(top_srcdir)/gl/base64.o
|
||||
am_test_cmd_OBJECTS = test_cmd-test_cmd.$(OBJEXT)
|
||||
test_cmd_OBJECTS = $(am_test_cmd_OBJECTS)
|
||||
test_cmd_DEPENDENCIES = ../utils_cmd.o ../utils_base.o
|
||||
am_test_disk_OBJECTS = test_disk-test_disk.$(OBJEXT)
|
||||
test_disk_OBJECTS = $(am_test_disk_OBJECTS)
|
||||
test_disk_DEPENDENCIES = ../utils_disk.o $(top_srcdir)/gl/libgnu.a
|
||||
am_test_ini_OBJECTS = test_ini-test_ini.$(OBJEXT)
|
||||
test_ini_OBJECTS = $(am_test_ini_OBJECTS)
|
||||
test_ini_DEPENDENCIES = ../utils_base.o ../parse_ini.o
|
||||
am_test_opts_OBJECTS = test_opts-test_opts.$(OBJEXT)
|
||||
test_opts_OBJECTS = $(am_test_opts_OBJECTS)
|
||||
test_opts_DEPENDENCIES = ../utils_base.o ../parse_ini.o \
|
||||
../extra_opts.o
|
||||
am_test_tcp_OBJECTS = test_tcp-test_tcp.$(OBJEXT)
|
||||
test_tcp_OBJECTS = $(am_test_tcp_OBJECTS)
|
||||
test_tcp_DEPENDENCIES = ../utils_tcp.o
|
||||
|
@ -130,17 +142,15 @@ CCLD = $(CC)
|
|||
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(test_base64_SOURCES) $(test_cmd_SOURCES) \
|
||||
$(test_disk_SOURCES) $(test_tcp_SOURCES) $(test_utils_SOURCES)
|
||||
$(test_disk_SOURCES) $(test_ini_SOURCES) $(test_opts_SOURCES) \
|
||||
$(test_tcp_SOURCES) $(test_utils_SOURCES)
|
||||
DIST_SOURCES = $(test_base64_SOURCES) $(test_cmd_SOURCES) \
|
||||
$(test_disk_SOURCES) $(test_tcp_SOURCES) $(test_utils_SOURCES)
|
||||
$(test_disk_SOURCES) $(test_ini_SOURCES) $(test_opts_SOURCES) \
|
||||
$(test_tcp_SOURCES) $(test_utils_SOURCES)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
INSTALL = @INSTALL@
|
||||
ABSOLUTE_STDINT_H = @ABSOLUTE_STDINT_H@
|
||||
ABSOLUTE_UNISTD_H = @ABSOLUTE_UNISTD_H@
|
||||
ABSOLUTE_WCHAR_H = @ABSOLUTE_WCHAR_H@
|
||||
ABSOLUTE_WCTYPE_H = @ABSOLUTE_WCTYPE_H@
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCA = @ALLOCA@
|
||||
ALLOCA_H = @ALLOCA_H@
|
||||
|
@ -185,27 +195,177 @@ EXTRA_NETOBJS = @EXTRA_NETOBJS@
|
|||
EXTRA_TEST = @EXTRA_TEST@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
FLOAT_H = @FLOAT_H@
|
||||
FLOORF_LIBM = @FLOORF_LIBM@
|
||||
GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
|
||||
GETOPT_H = @GETOPT_H@
|
||||
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
|
||||
GLIBC21 = @GLIBC21@
|
||||
GL_COND_LIBTOOL_FALSE = @GL_COND_LIBTOOL_FALSE@
|
||||
GL_COND_LIBTOOL_TRUE = @GL_COND_LIBTOOL_TRUE@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
GMSGFMT_015 = @GMSGFMT_015@
|
||||
GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
|
||||
GNULIB_CEILF = @GNULIB_CEILF@
|
||||
GNULIB_CEILL = @GNULIB_CEILL@
|
||||
GNULIB_CHOWN = @GNULIB_CHOWN@
|
||||
GNULIB_DUP2 = @GNULIB_DUP2@
|
||||
GNULIB_FCHDIR = @GNULIB_FCHDIR@
|
||||
GNULIB_FFLUSH = @GNULIB_FFLUSH@
|
||||
GNULIB_FLOORF = @GNULIB_FLOORF@
|
||||
GNULIB_FLOORL = @GNULIB_FLOORL@
|
||||
GNULIB_FOPEN = @GNULIB_FOPEN@
|
||||
GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
|
||||
GNULIB_FREOPEN = @GNULIB_FREOPEN@
|
||||
GNULIB_FREXP = @GNULIB_FREXP@
|
||||
GNULIB_FREXPL = @GNULIB_FREXPL@
|
||||
GNULIB_FSEEK = @GNULIB_FSEEK@
|
||||
GNULIB_FSEEKO = @GNULIB_FSEEKO@
|
||||
GNULIB_FTELL = @GNULIB_FTELL@
|
||||
GNULIB_FTELLO = @GNULIB_FTELLO@
|
||||
GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
|
||||
GNULIB_GETCWD = @GNULIB_GETCWD@
|
||||
GNULIB_GETDELIM = @GNULIB_GETDELIM@
|
||||
GNULIB_GETLINE = @GNULIB_GETLINE@
|
||||
GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
|
||||
GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
|
||||
GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
|
||||
GNULIB_ISFINITE = @GNULIB_ISFINITE@
|
||||
GNULIB_LCHOWN = @GNULIB_LCHOWN@
|
||||
GNULIB_LDEXPL = @GNULIB_LDEXPL@
|
||||
GNULIB_LSEEK = @GNULIB_LSEEK@
|
||||
GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
|
||||
GNULIB_MATHL = @GNULIB_MATHL@
|
||||
GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
|
||||
GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
|
||||
GNULIB_MBSCHR = @GNULIB_MBSCHR@
|
||||
GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
|
||||
GNULIB_MBSLEN = @GNULIB_MBSLEN@
|
||||
GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
|
||||
GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
|
||||
GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
|
||||
GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
|
||||
GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
|
||||
GNULIB_MBSSEP = @GNULIB_MBSSEP@
|
||||
GNULIB_MBSSPN = @GNULIB_MBSSPN@
|
||||
GNULIB_MBSSTR = @GNULIB_MBSSTR@
|
||||
GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
|
||||
GNULIB_MEMMEM = @GNULIB_MEMMEM@
|
||||
GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
|
||||
GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
|
||||
GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
|
||||
GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
|
||||
GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
|
||||
GNULIB_PUTENV = @GNULIB_PUTENV@
|
||||
GNULIB_READLINK = @GNULIB_READLINK@
|
||||
GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
|
||||
GNULIB_ROUND = @GNULIB_ROUND@
|
||||
GNULIB_ROUNDF = @GNULIB_ROUNDF@
|
||||
GNULIB_ROUNDL = @GNULIB_ROUNDL@
|
||||
GNULIB_SETENV = @GNULIB_SETENV@
|
||||
GNULIB_SIGNBIT = @GNULIB_SIGNBIT@
|
||||
GNULIB_SLEEP = @GNULIB_SLEEP@
|
||||
GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
|
||||
GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
|
||||
GNULIB_STPCPY = @GNULIB_STPCPY@
|
||||
GNULIB_STPNCPY = @GNULIB_STPNCPY@
|
||||
GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
|
||||
GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
|
||||
GNULIB_STRDUP = @GNULIB_STRDUP@
|
||||
GNULIB_STRERROR = @GNULIB_STRERROR@
|
||||
GNULIB_STRNDUP = @GNULIB_STRNDUP@
|
||||
GNULIB_STRNLEN = @GNULIB_STRNLEN@
|
||||
GNULIB_STRPBRK = @GNULIB_STRPBRK@
|
||||
GNULIB_STRSEP = @GNULIB_STRSEP@
|
||||
GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
|
||||
GNULIB_STRSTR = @GNULIB_STRSTR@
|
||||
GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
|
||||
GNULIB_TRUNC = @GNULIB_TRUNC@
|
||||
GNULIB_TRUNCF = @GNULIB_TRUNCF@
|
||||
GNULIB_TRUNCL = @GNULIB_TRUNCL@
|
||||
GNULIB_UNSETENV = @GNULIB_UNSETENV@
|
||||
GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
|
||||
GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
|
||||
GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
|
||||
GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
|
||||
GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
|
||||
GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
|
||||
GREP = @GREP@
|
||||
HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@
|
||||
HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@
|
||||
HAVE_DECL_ASINL = @HAVE_DECL_ASINL@
|
||||
HAVE_DECL_ATANL = @HAVE_DECL_ATANL@
|
||||
HAVE_DECL_COSL = @HAVE_DECL_COSL@
|
||||
HAVE_DECL_EXPL = @HAVE_DECL_EXPL@
|
||||
HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@
|
||||
HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
|
||||
HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
|
||||
HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
|
||||
HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@
|
||||
HAVE_DECL_LOGL = @HAVE_DECL_LOGL@
|
||||
HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
|
||||
HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
|
||||
HAVE_DECL_SINL = @HAVE_DECL_SINL@
|
||||
HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
|
||||
HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@
|
||||
HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
|
||||
HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@
|
||||
HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
|
||||
HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
|
||||
HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@
|
||||
HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
|
||||
HAVE_DECL_TANL = @HAVE_DECL_TANL@
|
||||
HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@
|
||||
HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@
|
||||
HAVE_DECL_TRUNCL = @HAVE_DECL_TRUNCL@
|
||||
HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
|
||||
HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
|
||||
HAVE_DUP2 = @HAVE_DUP2@
|
||||
HAVE_FSEEKO = @HAVE_FSEEKO@
|
||||
HAVE_FTELLO = @HAVE_FTELLO@
|
||||
HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
|
||||
HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
|
||||
HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
|
||||
HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
|
||||
HAVE_ISWCNTRL = @HAVE_ISWCNTRL@
|
||||
HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
|
||||
HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@
|
||||
HAVE_MEMPCPY = @HAVE_MEMPCPY@
|
||||
HAVE_MKDTEMP = @HAVE_MKDTEMP@
|
||||
HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@
|
||||
HAVE_OS_H = @HAVE_OS_H@
|
||||
HAVE_READLINK = @HAVE_READLINK@
|
||||
HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@
|
||||
HAVE_SETENV = @HAVE_SETENV@
|
||||
HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
|
||||
HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
|
||||
HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
|
||||
HAVE_SLEEP = @HAVE_SLEEP@
|
||||
HAVE_STDINT_H = @HAVE_STDINT_H@
|
||||
HAVE_STPCPY = @HAVE_STPCPY@
|
||||
HAVE_STPNCPY = @HAVE_STPNCPY@
|
||||
HAVE_STRCASESTR = @HAVE_STRCASESTR@
|
||||
HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
|
||||
HAVE_STRNDUP = @HAVE_STRNDUP@
|
||||
HAVE_STRPBRK = @HAVE_STRPBRK@
|
||||
HAVE_STRSEP = @HAVE_STRSEP@
|
||||
HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
|
||||
HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
|
||||
HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
|
||||
HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@
|
||||
HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
|
||||
HAVE_UNISTD_H = @HAVE_UNISTD_H@
|
||||
HAVE_UNSETENV = @HAVE_UNSETENV@
|
||||
HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
|
||||
HAVE_VASPRINTF = @HAVE_VASPRINTF@
|
||||
HAVE_WCHAR_H = @HAVE_WCHAR_H@
|
||||
HAVE_WCTYPE_H = @HAVE_WCTYPE_H@
|
||||
HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@
|
||||
HAVE_WINT_T = @HAVE_WINT_T@
|
||||
HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@
|
||||
HAVE__BOOL = @HAVE__BOOL@
|
||||
HOSTNAME = @HOSTNAME@
|
||||
INCLUDE_NEXT = @INCLUDE_NEXT@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
|
@ -226,6 +386,7 @@ LIBOBJS = @LIBOBJS@
|
|||
LIBS = @LIBINTL@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@
|
||||
LTLIBICONV = @LTLIBICONV@
|
||||
LTLIBINTL = @LTLIBINTL@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
|
@ -239,6 +400,17 @@ MYSQLINCLUDE = @MYSQLINCLUDE@
|
|||
MYSQLLIBS = @MYSQLLIBS@
|
||||
NEED_SETGID = @NEED_SETGID@
|
||||
NETINET_IN_H = @NETINET_IN_H@
|
||||
NEXT_FLOAT_H = @NEXT_FLOAT_H@
|
||||
NEXT_MATH_H = @NEXT_MATH_H@
|
||||
NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@
|
||||
NEXT_STDINT_H = @NEXT_STDINT_H@
|
||||
NEXT_STDIO_H = @NEXT_STDIO_H@
|
||||
NEXT_STDLIB_H = @NEXT_STDLIB_H@
|
||||
NEXT_STRING_H = @NEXT_STRING_H@
|
||||
NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@
|
||||
NEXT_UNISTD_H = @NEXT_UNISTD_H@
|
||||
NEXT_WCHAR_H = @NEXT_WCHAR_H@
|
||||
NEXT_WCTYPE_H = @NEXT_WCTYPE_H@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
|
@ -277,11 +449,56 @@ PKG_ARCH = @PKG_ARCH@
|
|||
PLUGIN_TEST = @PLUGIN_TEST@
|
||||
POSUB = @POSUB@
|
||||
POW_LIB = @POW_LIB@
|
||||
PST3CFLAGS = @PST3CFLAGS@
|
||||
PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
|
||||
PYTHON = @PYTHON@
|
||||
RADIUSLIBS = @RADIUSLIBS@
|
||||
RANLIB = @RANLIB@
|
||||
RELEASE = @RELEASE@
|
||||
REPLACE_CEILF = @REPLACE_CEILF@
|
||||
REPLACE_CEILL = @REPLACE_CEILL@
|
||||
REPLACE_CHOWN = @REPLACE_CHOWN@
|
||||
REPLACE_FCHDIR = @REPLACE_FCHDIR@
|
||||
REPLACE_FFLUSH = @REPLACE_FFLUSH@
|
||||
REPLACE_FLOORF = @REPLACE_FLOORF@
|
||||
REPLACE_FLOORL = @REPLACE_FLOORL@
|
||||
REPLACE_FOPEN = @REPLACE_FOPEN@
|
||||
REPLACE_FPRINTF = @REPLACE_FPRINTF@
|
||||
REPLACE_FREOPEN = @REPLACE_FREOPEN@
|
||||
REPLACE_FREXP = @REPLACE_FREXP@
|
||||
REPLACE_FREXPL = @REPLACE_FREXPL@
|
||||
REPLACE_FSEEK = @REPLACE_FSEEK@
|
||||
REPLACE_FSEEKO = @REPLACE_FSEEKO@
|
||||
REPLACE_FTELL = @REPLACE_FTELL@
|
||||
REPLACE_FTELLO = @REPLACE_FTELLO@
|
||||
REPLACE_GETCWD = @REPLACE_GETCWD@
|
||||
REPLACE_GETLINE = @REPLACE_GETLINE@
|
||||
REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
|
||||
REPLACE_ISFINITE = @REPLACE_ISFINITE@
|
||||
REPLACE_LCHOWN = @REPLACE_LCHOWN@
|
||||
REPLACE_LDEXPL = @REPLACE_LDEXPL@
|
||||
REPLACE_LSEEK = @REPLACE_LSEEK@
|
||||
REPLACE_MEMMEM = @REPLACE_MEMMEM@
|
||||
REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
|
||||
REPLACE_PRINTF = @REPLACE_PRINTF@
|
||||
REPLACE_PUTENV = @REPLACE_PUTENV@
|
||||
REPLACE_ROUND = @REPLACE_ROUND@
|
||||
REPLACE_ROUNDF = @REPLACE_ROUNDF@
|
||||
REPLACE_ROUNDL = @REPLACE_ROUNDL@
|
||||
REPLACE_SIGNBIT = @REPLACE_SIGNBIT@
|
||||
REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@
|
||||
REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
|
||||
REPLACE_SPRINTF = @REPLACE_SPRINTF@
|
||||
REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
|
||||
REPLACE_STRERROR = @REPLACE_STRERROR@
|
||||
REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
|
||||
REPLACE_STRSTR = @REPLACE_STRSTR@
|
||||
REPLACE_VASPRINTF = @REPLACE_VASPRINTF@
|
||||
REPLACE_VFPRINTF = @REPLACE_VFPRINTF@
|
||||
REPLACE_VPRINTF = @REPLACE_VPRINTF@
|
||||
REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
|
||||
REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
|
||||
REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
|
||||
REV_DATESTAMP = @REV_DATESTAMP@
|
||||
REV_TIMESTAMP = @REV_TIMESTAMP@
|
||||
SCRIPT_TEST = @SCRIPT_TEST@
|
||||
|
@ -298,9 +515,11 @@ STDINT_H = @STDINT_H@
|
|||
STRIP = @STRIP@
|
||||
SUPPORT = @SUPPORT@
|
||||
SYS_SOCKET_H = @SYS_SOCKET_H@
|
||||
UNISTD_H = @UNISTD_H@
|
||||
USE_NLS = @USE_NLS@
|
||||
USE_PARSE_INI_FALSE = @USE_PARSE_INI_FALSE@
|
||||
USE_PARSE_INI_TRUE = @USE_PARSE_INI_TRUE@
|
||||
VERSION = @VERSION@
|
||||
VOID_UNSETENV = @VOID_UNSETENV@
|
||||
WARRANTY = @WARRANTY@
|
||||
WCHAR_H = @WCHAR_H@
|
||||
WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
|
||||
|
@ -308,6 +527,7 @@ WCTYPE_H = @WCTYPE_H@
|
|||
WINT_T_SUFFIX = @WINT_T_SUFFIX@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
XGETTEXT_015 = @XGETTEXT_015@
|
||||
XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
|
@ -334,6 +554,8 @@ dvidir = @dvidir@
|
|||
exec_prefix = @exec_prefix@
|
||||
gl_LIBOBJS = @gl_LIBOBJS@
|
||||
gl_LTLIBOBJS = @gl_LTLIBOBJS@
|
||||
gltests_LIBOBJS = @gltests_LIBOBJS@
|
||||
gltests_LTLIBOBJS = @gltests_LTLIBOBJS@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
|
@ -364,7 +586,9 @@ with_trusted_path = @with_trusted_path@
|
|||
# These two lines support "make check", but we use "make test"
|
||||
TESTS = @EXTRA_TEST@
|
||||
INCLUDES = -I$(top_srcdir)/lib -I$(top_srcdir)/gl -I$(top_srcdir)/intl -I$(top_srcdir)/plugins
|
||||
EXTRA_DIST = test_utils.t test_disk.t test_tcp.t test_cmd.t test_base64.t
|
||||
np_test_scripts = test_base64.t test_cmd.t test_disk.t test_ini.t test_opts.t test_tcp.t test_utils.t
|
||||
np_test_files = config-dos.ini config-opts.ini config-tiny.ini plugin.ini plugins.ini
|
||||
EXTRA_DIST = $(np_test_scripts) $(np_test_files)
|
||||
test_utils_SOURCES = test_utils.c
|
||||
test_utils_CFLAGS = -g -I..
|
||||
test_utils_LDFLAGS = -L/usr/local/lib -ltap
|
||||
|
@ -384,7 +608,15 @@ test_cmd_LDADD = ../utils_cmd.o ../utils_base.o
|
|||
test_base64_SOURCES = test_base64.c
|
||||
test_base64_CFLAGS = -g -I..
|
||||
test_base64_LDFLAGS = -L/usr/local/lib -ltap
|
||||
test_base64_LDADD = ../base64.o
|
||||
test_base64_LDADD = $(top_srcdir)/gl/base64.o
|
||||
test_ini_SOURCES = test_ini.c
|
||||
test_ini_CFLAGS = -g -I..
|
||||
test_ini_LDFLAGS = -L/usr/local/lib -ltap
|
||||
test_ini_LDADD = ../utils_base.o ../parse_ini.o
|
||||
test_opts_SOURCES = test_opts.c
|
||||
test_opts_CFLAGS = -g -I..
|
||||
test_opts_LDFLAGS = -L/usr/local/lib -ltap
|
||||
test_opts_LDADD = ../utils_base.o ../parse_ini.o ../extra_opts.o
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
|
@ -441,6 +673,12 @@ test_cmd$(EXEEXT): $(test_cmd_OBJECTS) $(test_cmd_DEPENDENCIES)
|
|||
test_disk$(EXEEXT): $(test_disk_OBJECTS) $(test_disk_DEPENDENCIES)
|
||||
@rm -f test_disk$(EXEEXT)
|
||||
$(LINK) $(test_disk_LDFLAGS) $(test_disk_OBJECTS) $(test_disk_LDADD) $(LIBS)
|
||||
test_ini$(EXEEXT): $(test_ini_OBJECTS) $(test_ini_DEPENDENCIES)
|
||||
@rm -f test_ini$(EXEEXT)
|
||||
$(LINK) $(test_ini_LDFLAGS) $(test_ini_OBJECTS) $(test_ini_LDADD) $(LIBS)
|
||||
test_opts$(EXEEXT): $(test_opts_OBJECTS) $(test_opts_DEPENDENCIES)
|
||||
@rm -f test_opts$(EXEEXT)
|
||||
$(LINK) $(test_opts_LDFLAGS) $(test_opts_OBJECTS) $(test_opts_LDADD) $(LIBS)
|
||||
test_tcp$(EXEEXT): $(test_tcp_OBJECTS) $(test_tcp_DEPENDENCIES)
|
||||
@rm -f test_tcp$(EXEEXT)
|
||||
$(LINK) $(test_tcp_LDFLAGS) $(test_tcp_OBJECTS) $(test_tcp_LDADD) $(LIBS)
|
||||
|
@ -457,6 +695,8 @@ distclean-compile:
|
|||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_base64-test_base64.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_cmd-test_cmd.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_disk-test_disk.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_ini-test_ini.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_opts-test_opts.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_tcp-test_tcp.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_utils-test_utils.Po@am__quote@
|
||||
|
||||
|
@ -523,6 +763,34 @@ test_disk-test_disk.obj: test_disk.c
|
|||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_disk_CFLAGS) $(CFLAGS) -c -o test_disk-test_disk.obj `if test -f 'test_disk.c'; then $(CYGPATH_W) 'test_disk.c'; else $(CYGPATH_W) '$(srcdir)/test_disk.c'; fi`
|
||||
|
||||
test_ini-test_ini.o: test_ini.c
|
||||
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ini_CFLAGS) $(CFLAGS) -MT test_ini-test_ini.o -MD -MP -MF "$(DEPDIR)/test_ini-test_ini.Tpo" -c -o test_ini-test_ini.o `test -f 'test_ini.c' || echo '$(srcdir)/'`test_ini.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/test_ini-test_ini.Tpo" "$(DEPDIR)/test_ini-test_ini.Po"; else rm -f "$(DEPDIR)/test_ini-test_ini.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test_ini.c' object='test_ini-test_ini.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ini_CFLAGS) $(CFLAGS) -c -o test_ini-test_ini.o `test -f 'test_ini.c' || echo '$(srcdir)/'`test_ini.c
|
||||
|
||||
test_ini-test_ini.obj: test_ini.c
|
||||
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ini_CFLAGS) $(CFLAGS) -MT test_ini-test_ini.obj -MD -MP -MF "$(DEPDIR)/test_ini-test_ini.Tpo" -c -o test_ini-test_ini.obj `if test -f 'test_ini.c'; then $(CYGPATH_W) 'test_ini.c'; else $(CYGPATH_W) '$(srcdir)/test_ini.c'; fi`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/test_ini-test_ini.Tpo" "$(DEPDIR)/test_ini-test_ini.Po"; else rm -f "$(DEPDIR)/test_ini-test_ini.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test_ini.c' object='test_ini-test_ini.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ini_CFLAGS) $(CFLAGS) -c -o test_ini-test_ini.obj `if test -f 'test_ini.c'; then $(CYGPATH_W) 'test_ini.c'; else $(CYGPATH_W) '$(srcdir)/test_ini.c'; fi`
|
||||
|
||||
test_opts-test_opts.o: test_opts.c
|
||||
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_opts_CFLAGS) $(CFLAGS) -MT test_opts-test_opts.o -MD -MP -MF "$(DEPDIR)/test_opts-test_opts.Tpo" -c -o test_opts-test_opts.o `test -f 'test_opts.c' || echo '$(srcdir)/'`test_opts.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/test_opts-test_opts.Tpo" "$(DEPDIR)/test_opts-test_opts.Po"; else rm -f "$(DEPDIR)/test_opts-test_opts.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test_opts.c' object='test_opts-test_opts.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_opts_CFLAGS) $(CFLAGS) -c -o test_opts-test_opts.o `test -f 'test_opts.c' || echo '$(srcdir)/'`test_opts.c
|
||||
|
||||
test_opts-test_opts.obj: test_opts.c
|
||||
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_opts_CFLAGS) $(CFLAGS) -MT test_opts-test_opts.obj -MD -MP -MF "$(DEPDIR)/test_opts-test_opts.Tpo" -c -o test_opts-test_opts.obj `if test -f 'test_opts.c'; then $(CYGPATH_W) 'test_opts.c'; else $(CYGPATH_W) '$(srcdir)/test_opts.c'; fi`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/test_opts-test_opts.Tpo" "$(DEPDIR)/test_opts-test_opts.Po"; else rm -f "$(DEPDIR)/test_opts-test_opts.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test_opts.c' object='test_opts-test_opts.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_opts_CFLAGS) $(CFLAGS) -c -o test_opts-test_opts.obj `if test -f 'test_opts.c'; then $(CYGPATH_W) 'test_opts.c'; else $(CYGPATH_W) '$(srcdir)/test_opts.c'; fi`
|
||||
|
||||
test_tcp-test_tcp.o: test_tcp.c
|
||||
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_tcp_CFLAGS) $(CFLAGS) -MT test_tcp-test_tcp.o -MD -MP -MF "$(DEPDIR)/test_tcp-test_tcp.Tpo" -c -o test_tcp-test_tcp.o `test -f 'test_tcp.c' || echo '$(srcdir)/'`test_tcp.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/test_tcp-test_tcp.Tpo" "$(DEPDIR)/test_tcp-test_tcp.Po"; else rm -f "$(DEPDIR)/test_tcp-test_tcp.Tpo"; exit 1; fi
|
||||
|
|
24
lib/tests/config-dos.ini
Normal file
24
lib/tests/config-dos.ini
Normal file
|
@ -0,0 +1,24 @@
|
|||
# This config file is amended from perl's Config::Tiny's testcases
|
||||
|
||||
# Line below is allowed in perl's Config::Tiny, but not in our parse_ini.c
|
||||
#root=something
|
||||
|
||||
[section]
|
||||
one=two
|
||||
Foo=Bar
|
||||
this=Your Mother!
|
||||
blank=
|
||||
|
||||
[Section Two]
|
||||
something else=blah
|
||||
remove = whitespace
|
||||
|
||||
[ /path/to/file.txt ]
|
||||
this=that
|
||||
|
||||
[ section2]
|
||||
this=that
|
||||
|
||||
[section3 ]
|
||||
this=that
|
||||
|
14
lib/tests/config-opts.ini
Normal file
14
lib/tests/config-opts.ini
Normal file
|
@ -0,0 +1,14 @@
|
|||
# This config file is for testing test_opts
|
||||
|
||||
[sect1]
|
||||
one=two
|
||||
|
||||
[check_disk]
|
||||
foo=Bar
|
||||
this=Your Mother!
|
||||
blank=
|
||||
|
||||
[sect2]
|
||||
something else=oops
|
||||
this=that
|
||||
|
24
lib/tests/config-tiny.ini
Normal file
24
lib/tests/config-tiny.ini
Normal file
|
@ -0,0 +1,24 @@
|
|||
# This config file is amended from perl's Config::Tiny's testcases
|
||||
|
||||
# Line below is allowed in perl's Config::Tiny, but not in our parse_ini.c
|
||||
#root=something
|
||||
|
||||
[section]
|
||||
one=two
|
||||
Foo=Bar
|
||||
this=Your Mother!
|
||||
blank=
|
||||
|
||||
[Section Two]
|
||||
something else=blah
|
||||
remove = whitespace
|
||||
|
||||
[ /path/to/file.txt ]
|
||||
this=that
|
||||
|
||||
[ section2]
|
||||
this=that
|
||||
|
||||
[section3 ]
|
||||
this=that
|
||||
|
21
lib/tests/plugin.ini
Normal file
21
lib/tests/plugin.ini
Normal file
|
@ -0,0 +1,21 @@
|
|||
|
||||
[check_mysql]
|
||||
username=operator
|
||||
password=secret # Remember to change later
|
||||
|
||||
[section_twice]
|
||||
foo=bar
|
||||
|
||||
[check_mysql2]
|
||||
u=admin
|
||||
p=secret
|
||||
|
||||
[section_twice]
|
||||
bar=foo
|
||||
|
||||
[check space_and_flags]
|
||||
foo=bar
|
||||
a=
|
||||
b=
|
||||
bar=
|
||||
|
7
lib/tests/plugins.ini
Normal file
7
lib/tests/plugins.ini
Normal file
|
@ -0,0 +1,7 @@
|
|||
|
||||
[check_disk]
|
||||
foo=bar
|
||||
|
||||
[section1]
|
||||
foobar=baz
|
||||
|
|
@ -1,25 +1,24 @@
|
|||
/******************************************************************************
|
||||
|
||||
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
$Id: test_base64.c 1819 2007-11-09 23:24:45Z dermoth $
|
||||
|
||||
******************************************************************************/
|
||||
/*****************************************************************************
|
||||
*
|
||||
* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* $Id: test_base64.c 1927 2008-02-13 04:07:39Z dermoth $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#include "common.h"
|
||||
#include "base64.h"
|
||||
#include "gl/base64.h"
|
||||
#include "tap.h"
|
||||
|
||||
int
|
||||
|
@ -249,7 +248,7 @@ main (int argc, char **argv)
|
|||
0x2b,0x00,0x1f,0x0c,0x28,0x59,0x0a,0x16,0x49,0x5a,0x5c,0x64,0x65,0x4b,0x11,0x29,
|
||||
0x15,0x36,0x5a,0x65,0x19,0x4f,0x60,0x23,0x3a,0x3a,0x13,0x25,0x02,0x78,0x4c,0x54
|
||||
};
|
||||
char b64_known[1368] = {
|
||||
char b64_known[1369] = {
|
||||
0x43,0x7a,0x42,0x45,0x59,0x6e,0x77,0x69,0x48,0x77,0x30,0x46,0x5a,0x79,0x77,0x71,
|
||||
0x4f,0x53,0x46,0x47,0x43,0x46,0x42,0x6d,0x4e,0x44,0x63,0x4c,0x52,0x55,0x73,0x34,
|
||||
0x4d,0x67,0x5a,0x36,0x50,0x6e,0x38,0x4d,0x51,0x42,0x68,0x72,0x4c,0x57,0x42,0x4d,
|
||||
|
@ -335,13 +334,13 @@ main (int argc, char **argv)
|
|||
0x48,0x33,0x41,0x41,0x4c,0x6d,0x59,0x55,0x50,0x48,0x38,0x72,0x41,0x42,0x38,0x4d,
|
||||
0x4b,0x46,0x6b,0x4b,0x46,0x6b,0x6c,0x61,0x58,0x47,0x52,0x6c,0x53,0x78,0x45,0x70,
|
||||
0x46,0x54,0x5a,0x61,0x5a,0x52,0x6c,0x50,0x59,0x43,0x4d,0x36,0x4f,0x68,0x4d,0x6c,
|
||||
0x41,0x6e,0x68,0x4d,0x56,0x41,0x3d,0x3d
|
||||
0x41,0x6e,0x68,0x4d,0x56,0x41,0x3d,0x3d,0x00
|
||||
};
|
||||
char *b64_test;
|
||||
|
||||
plan_tests(1);
|
||||
|
||||
b64_test = base64 (random, 1024);
|
||||
base64_encode_alloc (random, 1024, &b64_test);
|
||||
|
||||
ok(strcmp(b64_known, b64_test) == 0,
|
||||
"Test matching a base64 encoded 1024 bytes random string");
|
||||
|
|
|
@ -1,22 +1,21 @@
|
|||
/******************************************************************************
|
||||
|
||||
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
$Id: test_cmd.c 1732 2007-06-03 15:58:22Z psychotrahe $
|
||||
|
||||
******************************************************************************/
|
||||
/*****************************************************************************
|
||||
*
|
||||
* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#include "common.h"
|
||||
#include "utils_cmd.h"
|
||||
|
@ -51,7 +50,7 @@ main (int argc, char **argv)
|
|||
int c;
|
||||
int result = UNSET;
|
||||
|
||||
plan_tests(50);
|
||||
plan_tests(51);
|
||||
|
||||
diag ("Running plain echo command, set one");
|
||||
|
||||
|
@ -202,7 +201,17 @@ main (int argc, char **argv)
|
|||
ok (chld_err.lines == 1,
|
||||
"...but does give an error line");
|
||||
ok (strstr(chld_err.line[0],"non-existant-file") != NULL, "And missing filename is in error message");
|
||||
ok (result == 127, "Get return code 127 from /bin/sh");
|
||||
ok (result != 0, "Get non-zero return code from /bin/sh");
|
||||
|
||||
|
||||
/* ensure everything is empty again */
|
||||
result = UNSET;
|
||||
|
||||
command = (char *)malloc(COMMAND_LINE);
|
||||
strcpy(command, "/bin/sh -c 'exit 7'");
|
||||
result = cmd_run (command, NULL, NULL, 0);
|
||||
|
||||
ok (result == 7, "Get return code 7 from /bin/sh");
|
||||
|
||||
|
||||
/* ensure everything is empty again */
|
||||
|
|
|
@ -1,22 +1,21 @@
|
|||
/******************************************************************************
|
||||
|
||||
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
$Id: test_disk.c 1786 2007-09-22 17:40:35Z psychotrahe $
|
||||
|
||||
******************************************************************************/
|
||||
/*****************************************************************************
|
||||
*
|
||||
* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* $Id: test_disk.c 1914 2008-01-30 09:38:37Z dermoth $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#include "common.h"
|
||||
#include "utils_disk.h"
|
||||
|
|
114
lib/tests/test_ini.c
Normal file
114
lib/tests/test_ini.c
Normal file
|
@ -0,0 +1,114 @@
|
|||
/*****************************************************************************
|
||||
*
|
||||
* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* $Id: test_ini.c 1976 2008-04-04 10:11:22Z dermoth $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#include "common.h"
|
||||
#include "utils_base.h"
|
||||
#include "parse_ini.h"
|
||||
|
||||
#include "tap.h"
|
||||
|
||||
void my_free(char *string) {
|
||||
if (string != NULL) {
|
||||
printf("string:\n\t|%s|\n", string);
|
||||
free(string);
|
||||
}
|
||||
}
|
||||
|
||||
char*
|
||||
list2str(np_arg_list *optlst)
|
||||
{
|
||||
char *optstr=NULL;
|
||||
np_arg_list *optltmp;
|
||||
|
||||
/* Put everything as a space-separated string */
|
||||
asprintf(&optstr, "");
|
||||
while (optlst) {
|
||||
asprintf(&optstr, "%s%s ", optstr, optlst->arg);
|
||||
optltmp=optlst;
|
||||
optlst=optlst->next;
|
||||
free(optltmp);
|
||||
}
|
||||
/* Strip last whitespace */
|
||||
if (strlen(optstr)>1) optstr[strlen(optstr)-1]='\0';
|
||||
|
||||
return optstr;
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
char *optstr=NULL;
|
||||
|
||||
plan_tests(11);
|
||||
|
||||
optstr=list2str(np_get_defaults("section@./config-tiny.ini", "check_disk"));
|
||||
ok( !strcmp(optstr, "--one=two --Foo=Bar --this=Your Mother! --blank"), "config-tiny.ini's section as expected");
|
||||
my_free(optstr);
|
||||
|
||||
optstr=list2str(np_get_defaults("@./config-tiny.ini", "section"));
|
||||
ok( !strcmp(optstr, "--one=two --Foo=Bar --this=Your Mother! --blank"), "Used default section name, without specific");
|
||||
my_free(optstr);
|
||||
|
||||
/*
|
||||
* This check is expected to die - It's commented so we can eventually put
|
||||
* it in a separate file for testing the return value
|
||||
*/
|
||||
/* optstr=list2str(np_get_defaults("section_unknown@./config-tiny.ini", "section"));
|
||||
ok( 0, "die if section isn't found");
|
||||
my_free(optstr); */
|
||||
|
||||
optstr=list2str(np_get_defaults("Section Two@./config-tiny.ini", "check_disk"));
|
||||
ok( !strcmp(optstr, "--something else=blah --remove=whitespace"), "config-tiny.ini's Section Two as expected");
|
||||
my_free(optstr);
|
||||
|
||||
optstr=list2str(np_get_defaults("/path/to/file.txt@./config-tiny.ini", "check_disk"));
|
||||
ok( !strcmp(optstr, "--this=that"), "config-tiny.ini's filename as section name");
|
||||
my_free(optstr);
|
||||
|
||||
optstr=list2str(np_get_defaults("section2@./config-tiny.ini", "check_disk"));
|
||||
ok( !strcmp(optstr, "--this=that"), "config-tiny.ini's section2 with whitespace before section name");
|
||||
my_free(optstr);
|
||||
|
||||
optstr=list2str(np_get_defaults("section3@./config-tiny.ini", "check_disk"));
|
||||
ok( !strcmp(optstr, "--this=that"), "config-tiny.ini's section3 with whitespace after section name");
|
||||
my_free(optstr);
|
||||
|
||||
optstr=list2str(np_get_defaults("check_mysql@./plugin.ini", "check_disk"));
|
||||
ok( !strcmp(optstr, "--username=operator --password=secret"), "plugin.ini's check_mysql as expected");
|
||||
my_free(optstr);
|
||||
|
||||
optstr=list2str(np_get_defaults("check_mysql2@./plugin.ini", "check_disk"));
|
||||
ok( !strcmp(optstr, "-u=admin -p=secret"), "plugin.ini's check_mysql2 as expected");
|
||||
my_free(optstr);
|
||||
|
||||
optstr=list2str(np_get_defaults("check space_and_flags@./plugin.ini", "check_disk"));
|
||||
ok( !strcmp(optstr, "--foo=bar -a -b --bar"), "plugin.ini space in stanza and flag arguments");
|
||||
my_free(optstr);
|
||||
|
||||
optstr=list2str(np_get_defaults("Section Two@./config-dos.ini", "check_disk"));
|
||||
ok( !strcmp(optstr, "--something else=blah --remove=whitespace"), "config-dos.ini's Section Two as expected");
|
||||
my_free(optstr);
|
||||
|
||||
optstr=list2str(np_get_defaults("section_twice@./plugin.ini", "check_disk"));
|
||||
ok( !strcmp(optstr, "--foo=bar --bar=foo"), "plugin.ini's section_twice defined twice in the file");
|
||||
my_free(optstr);
|
||||
|
||||
return exit_status();
|
||||
}
|
||||
|
6
lib/tests/test_ini.t
Executable file
6
lib/tests/test_ini.t
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/usr/bin/perl
|
||||
use Test::More;
|
||||
if (! -e "./test_ini") {
|
||||
plan skip_all => "./test_ini not compiled - please install tap library and/or enable parse-ini to test";
|
||||
}
|
||||
exec "./test_ini";
|
278
lib/tests/test_opts.c
Normal file
278
lib/tests/test_opts.c
Normal file
|
@ -0,0 +1,278 @@
|
|||
/*****************************************************************************
|
||||
*
|
||||
* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* $Id: test_ini.c 1951 2008-03-16 18:10:47Z dermoth $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#include "common.h"
|
||||
#include "utils_base.h"
|
||||
#include "extra_opts.h"
|
||||
|
||||
#include "tap.h"
|
||||
|
||||
void my_free(int *argc, char **argv) {
|
||||
int i;
|
||||
printf (" Arg(%i): ", *argc);
|
||||
for (i=1; i<*argc; i++) printf ("'%s' ", argv[i]);
|
||||
printf ("\n");
|
||||
free(argv);
|
||||
*argc=0;
|
||||
}
|
||||
|
||||
int array_diff(int i1, char **a1, int i2, char **a2) {
|
||||
int i;
|
||||
|
||||
if (i1 != i2) {
|
||||
printf(" Argument count doesn't match!\n");
|
||||
return 0;
|
||||
}
|
||||
for (i=0; i<=i1; i++) {
|
||||
if (a1[i]==NULL && a2[i]==NULL) continue;
|
||||
if (a1[i]==NULL || a2[i]==NULL) {
|
||||
printf(" Argument # %i null in one array!\n", i);
|
||||
return 0;
|
||||
}
|
||||
if (strcmp(a1[i], a2[i])) {
|
||||
printf(" Argument # %i doesn't match!\n", i);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
char **argv_test=NULL, **argv_known=NULL;
|
||||
int i, argc_test;
|
||||
|
||||
plan_tests(9);
|
||||
|
||||
argv_test=(char **)malloc(2*sizeof(char **));
|
||||
argv_test[0] = "prog_name";
|
||||
argv_test[1] = NULL;
|
||||
argc_test=1;
|
||||
argv_known=(char **)realloc(argv_known, 2*sizeof(char **));
|
||||
argv_known[0] = "prog_name";
|
||||
argv_known[1] = NULL;
|
||||
argv_test=np_extra_opts(&argc_test, argv_test, "check_disk");
|
||||
ok(array_diff(argc_test, argv_test, 1, argv_known), "No opts, returns correct argv/argc");
|
||||
my_free(&argc_test, argv_test);
|
||||
|
||||
argv_test=(char **)malloc(6*sizeof(char **));
|
||||
argv_test[0] = "prog_name";
|
||||
argv_test[1] = "arg1";
|
||||
argv_test[2] = "--arg2=val1";
|
||||
argv_test[3] = "--arg3";
|
||||
argv_test[4] = "val2";
|
||||
argv_test[5] = NULL;
|
||||
argc_test=5;
|
||||
argv_known=(char **)realloc(argv_known, 6*sizeof(char **));
|
||||
argv_known[0] = "prog_name";
|
||||
argv_known[1] = "arg1";
|
||||
argv_known[2] = "--arg2=val1";
|
||||
argv_known[3] = "--arg3";
|
||||
argv_known[4] = "val2";
|
||||
argv_known[5] = NULL;
|
||||
argv_test=np_extra_opts(&argc_test, argv_test, "check_disk");
|
||||
ok(array_diff(argc_test, argv_test, 5, argv_known), "No extra opts, verbatim copy of argv");
|
||||
my_free(&argc_test,argv_test);
|
||||
|
||||
argv_test=(char **)malloc(3*sizeof(char **));
|
||||
argv_test[0] = "prog_name";
|
||||
argv_test[1] = "--extra-opts=@./config-opts.ini";
|
||||
argv_test[2] = NULL;
|
||||
argc_test=2;
|
||||
argv_known=(char **)realloc(argv_known, 5*sizeof(char **));
|
||||
argv_known[0] = "prog_name";
|
||||
argv_known[1] = "--foo=Bar";
|
||||
argv_known[2] = "--this=Your Mother!";
|
||||
argv_known[3] = "--blank";
|
||||
argv_known[4] = NULL;
|
||||
argv_test=np_extra_opts(&argc_test, argv_test, "check_disk");
|
||||
ok(array_diff(argc_test, argv_test, 4, argv_known), "Only extra opts using default section");
|
||||
my_free(&argc_test,argv_test);
|
||||
|
||||
argv_test=(char **)malloc(5*sizeof(char **));
|
||||
argv_test[0] = "prog_name";
|
||||
argv_test[1] = "--extra-opts=sect1@./config-opts.ini";
|
||||
argv_test[2] = "--extra-opts";
|
||||
argv_test[3] = "sect2@./config-opts.ini";
|
||||
argv_test[4] = NULL;
|
||||
argc_test=4;
|
||||
argv_known=(char **)realloc(argv_known, 5*sizeof(char **));
|
||||
argv_known[0] = "prog_name";
|
||||
argv_known[1] = "--one=two";
|
||||
argv_known[2] = "--something else=oops";
|
||||
argv_known[3] = "--this=that";
|
||||
argv_known[4] = NULL;
|
||||
argv_test=np_extra_opts(&argc_test, argv_test, "check_disk");
|
||||
ok(array_diff(argc_test, argv_test, 4, argv_known), "Only extra opts specified twice");
|
||||
my_free(&argc_test,argv_test);
|
||||
|
||||
argv_test=(char **)malloc(7*sizeof(char **));
|
||||
argv_test[0] = "prog_name";
|
||||
argv_test[1] = "--arg1=val1";
|
||||
argv_test[2] = "--extra-opts=@./config-opts.ini";
|
||||
argv_test[3] = "--extra-opts";
|
||||
argv_test[4] = "sect1@./config-opts.ini";
|
||||
argv_test[5] = "--arg2";
|
||||
argv_test[6] = NULL;
|
||||
argc_test=6;
|
||||
argv_known=(char **)realloc(argv_known, 8*sizeof(char **));
|
||||
argv_known[0] = "prog_name";
|
||||
argv_known[1] = "--foo=Bar";
|
||||
argv_known[2] = "--this=Your Mother!";
|
||||
argv_known[3] = "--blank";
|
||||
argv_known[4] = "--one=two";
|
||||
argv_known[5] = "--arg1=val1";
|
||||
argv_known[6] = "--arg2";
|
||||
argv_known[7] = NULL;
|
||||
argv_test=np_extra_opts(&argc_test, argv_test, "check_disk");
|
||||
ok(array_diff(argc_test, argv_test, 7, argv_known), "twice extra opts using two sections");
|
||||
my_free(&argc_test,argv_test);
|
||||
|
||||
/* Next three checks dre expected to die. They are commented out as they
|
||||
* could possibly go in a sepatare test checked for return value.
|
||||
*/
|
||||
/* argv_test=(char **)malloc(6*sizeof(char **));
|
||||
argv_test[0] = "prog_name";
|
||||
argv_test[1] = "arg1";
|
||||
argv_test[2] = "--extra-opts=missing@./config-opts.ini";
|
||||
argv_test[3] = "--arg3";
|
||||
argv_test[4] = "val2";
|
||||
argv_test[5] = NULL;
|
||||
argc_test=5;
|
||||
argv_known=(char **)realloc(argv_known, 5*sizeof(char **));
|
||||
argv_known[0] = "prog_name";
|
||||
argv_known[1] = "arg1";
|
||||
argv_known[2] = "--arg3";
|
||||
argv_known[3] = "val2";
|
||||
argv_known[4] = NULL;
|
||||
argv_test=np_extra_opts(&argc_test, argv_test, "check_missing");
|
||||
ok(array_diff(argc_test, argv_test, 4, argv_known), "Missing section 1");
|
||||
my_free(&argc_test,argv_test); */
|
||||
|
||||
/* argv_test=(char **)malloc(7*sizeof(char **));
|
||||
argv_test[0] = "prog_name";
|
||||
argv_test[1] = "arg1";
|
||||
argv_test[2] = "--extra-opts";
|
||||
argv_test[3] = "missing@./config-opts.ini";
|
||||
argv_test[4] = "--arg3";
|
||||
argv_test[5] = "val2";
|
||||
argv_test[6] = NULL;
|
||||
argc_test=6;
|
||||
argv_known=(char **)realloc(argv_known, 5*sizeof(char **));
|
||||
argv_known[0] = "prog_name";
|
||||
argv_known[1] = "arg1";
|
||||
argv_known[2] = "--arg3";
|
||||
argv_known[3] = "val2";
|
||||
argv_known[4] = NULL;
|
||||
argv_test=np_extra_opts(&argc_test, argv_test, "check_missing");
|
||||
ok(array_diff(argc_test, argv_test, 4, argv_known), "Missing section 2");
|
||||
my_free(&argc_test,argv_test); */
|
||||
|
||||
/* argv_test=(char **)malloc(6*sizeof(char **));
|
||||
argv_test[0] = "prog_name";
|
||||
argv_test[1] = "arg1";
|
||||
argv_test[2] = "--extra-opts";
|
||||
argv_test[3] = "--arg3";
|
||||
argv_test[4] = "val2";
|
||||
argv_test[5] = NULL;
|
||||
argc_test=5;
|
||||
argv_known=(char **)realloc(argv_known, 5*sizeof(char **));
|
||||
argv_known[0] = "prog_name";
|
||||
argv_known[1] = "arg1";
|
||||
argv_known[2] = "--arg3";
|
||||
argv_known[3] = "val2";
|
||||
argv_known[4] = NULL;
|
||||
argv_test=np_extra_opts(&argc_test, argv_test, "check_missing");
|
||||
ok(array_diff(argc_test, argv_test, 4, argv_known), "Missing section 3");
|
||||
my_free(&argc_test,argv_test); */
|
||||
|
||||
setenv("NAGIOS_CONFIG_PATH", ".", 1);
|
||||
argv_test=(char **)malloc(6*sizeof(char **));
|
||||
argv_test[0] = "prog_name";
|
||||
argv_test[1] = "arg1";
|
||||
argv_test[2] = "--extra-opts";
|
||||
argv_test[3] = "--arg3";
|
||||
argv_test[4] = "val2";
|
||||
argv_test[5] = NULL;
|
||||
argc_test=5;
|
||||
argv_known=(char **)realloc(argv_known, 6*sizeof(char **));
|
||||
argv_known[0] = "prog_name";
|
||||
argv_known[1] = "--foo=bar";
|
||||
argv_known[2] = "arg1";
|
||||
argv_known[3] = "--arg3";
|
||||
argv_known[4] = "val2";
|
||||
argv_known[5] = NULL;
|
||||
argv_test=np_extra_opts(&argc_test, argv_test, "check_disk");
|
||||
ok(array_diff(argc_test, argv_test, 5, argv_known), "Default section 1");
|
||||
|
||||
argv_test=(char **)malloc(3*sizeof(char **));
|
||||
argv_test[0] = "prog_name";
|
||||
argv_test[1] = "--extra-opts";
|
||||
argv_test[2] = NULL;
|
||||
argc_test=2;
|
||||
argv_known=(char **)realloc(argv_known, 3*sizeof(char **));
|
||||
argv_known[0] = "prog_name";
|
||||
argv_known[1] = "--foo=bar";
|
||||
argv_known[2] = NULL;
|
||||
argv_test=np_extra_opts(&argc_test, argv_test, "check_disk");
|
||||
ok(array_diff(argc_test, argv_test, 2, argv_known), "Default section 2");
|
||||
my_free(&argc_test,argv_test);
|
||||
|
||||
argv_test=(char **)malloc(6*sizeof(char **));
|
||||
argv_test[0] = "prog_name";
|
||||
argv_test[1] = "arg1";
|
||||
argv_test[2] = "--extra-opts=section1";
|
||||
argv_test[3] = "--arg3";
|
||||
argv_test[4] = "val2";
|
||||
argv_test[5] = NULL;
|
||||
argc_test=5;
|
||||
argv_known=(char **)realloc(argv_known, 6*sizeof(char **));
|
||||
argv_known[0] = "prog_name";
|
||||
argv_known[1] = "--foobar=baz";
|
||||
argv_known[2] = "arg1";
|
||||
argv_known[3] = "--arg3";
|
||||
argv_known[4] = "val2";
|
||||
argv_known[5] = NULL;
|
||||
argv_test=np_extra_opts(&argc_test, argv_test, "check_disk");
|
||||
ok(array_diff(argc_test, argv_test, 5, argv_known), "Default section 3");
|
||||
my_free(&argc_test,argv_test);
|
||||
|
||||
argv_test=(char **)malloc(6*sizeof(char **));
|
||||
argv_test[0] = "prog_name";
|
||||
argv_test[1] = "arg1";
|
||||
argv_test[2] = "--extra-opts";
|
||||
argv_test[3] = "-arg3";
|
||||
argv_test[4] = "val2";
|
||||
argv_test[5] = NULL;
|
||||
argc_test=5;
|
||||
argv_known=(char **)realloc(argv_known, 6*sizeof(char **));
|
||||
argv_known[0] = "prog_name";
|
||||
argv_known[1] = "--foo=bar";
|
||||
argv_known[2] = "arg1";
|
||||
argv_known[3] = "-arg3";
|
||||
argv_known[4] = "val2";
|
||||
argv_known[5] = NULL;
|
||||
argv_test=np_extra_opts(&argc_test, argv_test, "check_disk");
|
||||
ok(array_diff(argc_test, argv_test, 5, argv_known), "Default section 4");
|
||||
my_free(&argc_test,argv_test);
|
||||
|
||||
return exit_status();
|
||||
}
|
||||
|
6
lib/tests/test_opts.t
Executable file
6
lib/tests/test_opts.t
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/usr/bin/perl
|
||||
use Test::More;
|
||||
if (! -e "./test_opts") {
|
||||
plan skip_all => "./test_opts not compiled - please install tap library and/or enable parse-ini to test";
|
||||
}
|
||||
exec "./test_opts";
|
|
@ -1,22 +1,21 @@
|
|||
/******************************************************************************
|
||||
|
||||
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
$Id: test_tcp.c 1732 2007-06-03 15:58:22Z psychotrahe $
|
||||
|
||||
******************************************************************************/
|
||||
/*****************************************************************************
|
||||
*
|
||||
* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* $Id: test_tcp.c 1914 2008-01-30 09:38:37Z dermoth $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#include "common.h"
|
||||
#include "utils_tcp.h"
|
||||
|
|
|
@ -1,22 +1,21 @@
|
|||
/******************************************************************************
|
||||
|
||||
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
$Id: test_utils.c 1452 2006-07-13 23:58:00Z tonvoon $
|
||||
|
||||
******************************************************************************/
|
||||
/*****************************************************************************
|
||||
*
|
||||
* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* $Id: test_utils.c 1914 2008-01-30 09:38:37Z dermoth $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#include "common.h"
|
||||
#include "utils_base.h"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue