diff options
Diffstat (limited to 'getdefs/test')
-rw-r--r-- | getdefs/test/Makefile.am | 41 | ||||
-rw-r--r-- | getdefs/test/Makefile.in | 551 | ||||
-rwxr-xr-x | getdefs/test/cfg.test | 115 | ||||
-rw-r--r-- | getdefs/test/defs | 86 | ||||
-rwxr-xr-x | getdefs/test/index.test | 130 | ||||
-rwxr-xr-x | getdefs/test/option.test | 107 | ||||
-rwxr-xr-x | getdefs/test/subblock.test | 105 |
7 files changed, 1135 insertions, 0 deletions
diff --git a/getdefs/test/Makefile.am b/getdefs/test/Makefile.am new file mode 100644 index 0000000..39b97f8 --- /dev/null +++ b/getdefs/test/Makefile.am @@ -0,0 +1,41 @@ +## -*- Mode: Makefile -*- +## +## Makefile.am -- process this file with automake to produce Makefile.in +## +## Author: Bruce Korb <bkorb@gnu.org> +## Time-stamp: "2010-07-18 09:05:44 bkorb" +## This file is part of AutoGen. +## AutoGen Copyright (c) 1992-2012 by Bruce Korb - all rights reserved +## +## AutoGen 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. +## +## AutoGen 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/>. + +TESTS = cfg.test index.test option.test subblock.test +EXTRA_DIST = defs $(TESTS) +testsubdir = ./testdir + +TESTS_ENVIRONMENT = top_srcdir=$(top_srcdir) \ + testsubdir=$(testsubdir) srcdir=$(srcdir) \ + GDexe=$(GDexe) AGexe=$(AGexe) CLexe=$(CLexe) + +distclean-local: + -rm -rf $(testsubdir) FAILURES + +check : perm-stamp + +$(TESTS) : perm-stamp + +perm-stamp : + cd $(srcdir) ; chmod +x *.test + +# Makefile.am ends here diff --git a/getdefs/test/Makefile.in b/getdefs/test/Makefile.in new file mode 100644 index 0000000..9a8c02e --- /dev/null +++ b/getdefs/test/Makefile.in @@ -0,0 +1,551 @@ +# Makefile.in generated by automake 1.12.2 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2012 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = getdefs/test +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/ag_macros.m4 \ + $(top_srcdir)/config/extensions.m4 \ + $(top_srcdir)/config/libopts.m4 \ + $(top_srcdir)/config/libtool.m4 \ + $(top_srcdir)/config/ltoptions.m4 \ + $(top_srcdir)/config/ltsugar.m4 \ + $(top_srcdir)/config/ltversion.m4 \ + $(top_srcdir)/config/lt~obsolete.m4 \ + $(top_srcdir)/config/onceonly.m4 \ + $(top_srcdir)/config/snprintfv.m4 \ + $(top_srcdir)/config/unlocked-io.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = $(am__tty_colors_dummy) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AGEN5_TESTS = @AGEN5_TESTS@ +AG_GUILE = @AG_GUILE@ +AG_LDFLAGS = @AG_LDFLAGS@ +AG_MAJOR_VERSION = @AG_MAJOR_VERSION@ +AG_MINOR_VERSION = @AG_MINOR_VERSION@ +AG_TIMEOUT = @AG_TIMEOUT@ +AG_VERSION = @AG_VERSION@ +AG_XML2 = @AG_XML2@ +AGexe = @AGexe@ +AGnam = @AGnam@ +AMTAR = @AMTAR@ +AO_AGE = @AO_AGE@ +AO_CURRENT = @AO_CURRENT@ +AO_REVISION = @AO_REVISION@ +AO_TEMPLATE_VERSION = @AO_TEMPLATE_VERSION@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CLexe = @CLexe@ +CLnam = @CLnam@ +CONFIG_SHELL = @CONFIG_SHELL@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEBUG_ENABLED = @DEBUG_ENABLED@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +DYNAMIC_AG = @DYNAMIC_AG@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ENABLE_STATIC = @ENABLE_STATIC@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GDexe = @GDexe@ +GDnam = @GDnam@ +GO_AGE = @GO_AGE@ +GO_CURRENT = @GO_CURRENT@ +GO_REVISION = @GO_REVISION@ +GREP = @GREP@ +GUILE_VERSION = @GUILE_VERSION@ +INCLIST = @INCLIST@ +INCSNPRINTFV = @INCSNPRINTFV@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBGUILE_CFLAGS = @LIBGUILE_CFLAGS@ +LIBGUILE_LIBS = @LIBGUILE_LIBS@ +LIBGUILE_PATH = @LIBGUILE_PATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBSNPRINTFV = @LIBSNPRINTFV@ +LIBTOOL = @LIBTOOL@ +LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LIBXML2_PATH = @LIBXML2_PATH@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +M4_SRC = @M4_SRC@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPTS_TESTDIR = @OPTS_TESTDIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +POSIX_SHELL = @POSIX_SHELL@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +TEXI2HTML = @TEXI2HTML@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_aux_dir = @ac_aux_dir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +TESTS = cfg.test index.test option.test subblock.test +EXTRA_DIST = defs $(TESTS) +testsubdir = ./testdir +TESTS_ENVIRONMENT = top_srcdir=$(top_srcdir) \ + testsubdir=$(testsubdir) srcdir=$(srcdir) \ + GDexe=$(GDexe) AGexe=$(AGexe) CLexe=$(CLexe) + +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu getdefs/test/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu getdefs/test/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + +cscope cscopelist: + + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst $(AM_TESTS_FD_REDIRECT); then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + fi; \ + echo "$${col}$$dashes$${std}"; \ + echo "$${col}$$banner$${std}"; \ + test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ + test -z "$$report" || echo "$${col}$$report$${std}"; \ + echo "$${col}$$dashes$${std}"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-local + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: check-am install-am install-strip + +.PHONY: all all-am check check-TESTS check-am clean clean-generic \ + clean-libtool distclean distclean-generic distclean-libtool \ + distclean-local distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + uninstall uninstall-am + + +distclean-local: + -rm -rf $(testsubdir) FAILURES + +check : perm-stamp + +$(TESTS) : perm-stamp + +perm-stamp : + cd $(srcdir) ; chmod +x *.test + +# Makefile.am ends here + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/getdefs/test/cfg.test b/getdefs/test/cfg.test new file mode 100755 index 0000000..1fb6fb0 --- /dev/null +++ b/getdefs/test/cfg.test @@ -0,0 +1,115 @@ +#! /bin/sh +# -*- Mode: Shell-script -*- +# cfg.test --- test config file processing +# +## Time-stamp: "2011-02-02 12:03:18 bkorb" +## Author: Bruce Korb <bkorb@gnu.org> +# +## This file is part of AutoGen. +## AutoGen Copyright (c) 1992-2012 by Bruce Korb - all rights reserved +## +## AutoGen 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. +## +## AutoGen 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/>. + +if test -z "$srcdir"; then + srcdir=`echo "$0" | ${SED} 's,[^/]*$,,'` + test -z "$srcdir" && srcdir=. + test "$srcdir" = "$0" && srcdir=. + test "${VERBOSE+set}" != set && VERBOSE=1 +fi +. $srcdir/defs + +# Create the files we need in the test environment +cat > ${testname}.c <<- _EOSource_ + + /*=* global + * + * test: subblock + * doc: we want to see + * just what happens + =*/ + + /*=gfunc in_p + * + * exparg: test-string , string to look for + + arg-name + arg-desc + arg-opt + arg-list + + * exparg: @ string-list @ list of strings to check,, @@ list + * + * opt: 1 + * doc: + * Return SCM_BOOL_T if the first argument is duplicated + * in the second (list) argument. + =*/ + SCM + ag_scm_in_p( SCM obj, SCM list ) + { + } + _EOSource_ + +cat > ${testname}.cfg <<- _EOCfg_ + output ${testname}.out + common-assign stumble = grumble + assign mumble = stumble ; mumble = grumble + template test${testname} + subblock exparg=arg_name,arg_desc,arg_optional,arg_list + _EOCfg_ + +cat > ${testname}.test <<- _EOTestOut_ + /* -*- buffer-read-only: t -*- vi: set ro: + * + * + * DO NOT EDIT THIS FILE (cfg.out) + * + * It has been extracted by getdefs from the following files: + * + * cfg.c + */ + autogen definitions testcfg; + mumble = stumble ; mumble = grumble; + + + /* GLOBALDEFS */ + + #line 2 "cfg.c" + test = 'subblock'; + doc = 'we want to see + just what happens'; + + + #line 9 "cfg.c" + gfunc = { + name = 'in_p'; + exparg = { + arg_name = 'test-string'; + arg_desc = 'string to look for'; + }; + exparg = { + arg_name = 'string-list'; + arg_desc = 'list of strings to check,,'; + arg_list = 'list'; + }; + opt = '1'; + doc = + 'Return SCM_BOOL_T if the first argument is duplicated + in the second (list) argument.'; + stumble = grumble; + }; + _EOTestOut_ + +set -x +${GDexe} load=${testname}.cfg ${testname}.c || \ + failure running ${GDexe} +cmp -s ${testname}.test ${testname}.out || \ + failure "`diff ${testname}.test ${testname}.out`" + +# cfg.test ends here diff --git a/getdefs/test/defs b/getdefs/test/defs new file mode 100644 index 0000000..000590b --- /dev/null +++ b/getdefs/test/defs @@ -0,0 +1,86 @@ +#! /bin/echo this_file_should_be_sourced,_not_executed +# -*- Mode: Shell-script -*- +# +# defs --- define the environment for autogen tests. +# +# Author: Bruce Korb <bkorb@gnu.org> +# Time-stamp: "2011-02-02 12:04:19 bkorb" +## +## This file is part of AutoGen. +## AutoGen Copyright (c) 1992-2012 by Bruce Korb - all rights reserved +## +## AutoGen 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. +## +## AutoGen 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/>. + +# Make sure srcdir is an absolute path. Supply the variable +# if it does not exist. We want to be able to run the tests +# stand-alone!! +# +srcdir=${srcdir-.} +if test ! -d $srcdir ; then + echo "defs: installation error" 1>&2 + exit 1 +fi + +# IF the source directory is a Unix or a DOS root directory, ... +# +case "$srcdir" in + /* | [A-Za-z]:\\*) ;; + *) srcdir=`\cd $srcdir && pwd` ;; +esac + +lo_dir=`cd ../../autoopts && pwd` +test -d ${lo_dir}/.libs && lo_dir=${lo_dir}/.libs +LD_LIBRARY_PATH=${lo_dir}:${LD_LIBRARY_PATH-/dev/null} +export LD_LIBRARY_PATH + +for SED in `exec 2>/dev/null;which gsed` \ + /bin/xpg4/bin/sed \ + `which sed` \ + /bin/sed \ + /usr/bin/sed +do test -x "${SED}" && break ; done + +progname=`echo "$0" | ${SED} 's,^.*/,,'` +testname=`echo "$progname" | ${SED} 's,\..*$,,'` +testsubdir=${testsubdir-testdir} + +# User can set VERBOSE to prevent output redirection +case x$VERBOSE in + xNO | xno | x0 | x) + exec > /dev/null 2>&1 + rm -rf $testsubdir + ;; +esac + +test -d $testsubdir || mkdir $testsubdir +cd $testsubdir +if test $? != 0 ; then + echo "Cannot make or change into $testsubdir" + exit 1 +fi + +echo "=== Running $progname" + +# A standard failure function +failure() +{ + cd ${testsubdir} + test -d ../FAILURES || mkdir ../FAILURES + l=`echo *` + ( \cd ../FAILURES ; rm -f $l ) + mv -f * ../FAILURES + echo "$*" + exit 1 +} +# defs ends here diff --git a/getdefs/test/index.test b/getdefs/test/index.test new file mode 100755 index 0000000..35ad971 --- /dev/null +++ b/getdefs/test/index.test @@ -0,0 +1,130 @@ +#! /bin/sh +# -*- Mode: Shell-script -*- +# +# subblock.test --- test the subblock parameter to getdefs +# +# Author: Bruce Korb <bkorb@gnu.org> +# Time-stamp: "2011-02-02 12:04:37 bkorb" +## +## This file is part of AutoGen. +## AutoGen Copyright (c) 1992-2012 by Bruce Korb - all rights reserved +## +## AutoGen 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. +## +## AutoGen 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/>. + +# Common definitions +if test -z "$srcdir"; then + srcdir=`echo "$0" | ${SED} 's,[^/]*$,,'` + test -z "$srcdir" && srcdir=. + test "$srcdir" = "$0" && srcdir=. + test "${VERBOSE+set}" != set && VERBOSE=1 +fi +. $srcdir/defs + + +# Create the files we need in the test environment +cat > ${testname}.c <<EOF +/*=--subblock=exparg=arg_name,arg_desc,arg_optional,arg_list=*/ +/*=--listattr=foo=*/ + +/*=gfunc xtract + * + * what: extract text from another file + * general_use: + * exparg: file-name, name of file with text + * exparg: marker-fmt, format for marker text + * exparg: caveat, warn about changing marker, opt + * exparg: default, default initial text, opt +=*/ + +/*=gfunc[2] in_p + * + * exparg: test-string , string to look for + + arg-name + arg-desc + arg-opt + arg-list + + * exparg: @ string-list @ list of strings to check,, @@ list + * + * opt: 1 + * doc: Return SCM_BOOL_T if the first argument is duplicated + * in the second (list) argument. + * foo: + bar ++ baz + +=*/ + SCM +ag_scm_in_p( SCM obj, SCM list ) +{ +} +EOF + +cat > ${testname}.test <<_EOF_ +/* -*- buffer-read-only: t -*- vi: set ro: + * + * + * DO NOT EDIT THIS FILE (index.out) + * + * It has been extracted by getdefs from the following files: + * + * index.c + */ +autogen definitions testdir; + +#line 14 "index.c" +gfunc[2] = { + name = 'in_p'; + exparg = { + arg_name = 'test-string'; + arg_desc = 'string to look for'; + }; + exparg = { + arg_name = 'string-list'; + arg_desc = 'list of strings to check,,'; + arg_list = 'list'; + }; + opt = '1'; + doc = 'Return SCM_BOOL_T if the first argument is duplicated +in the second (list) argument.'; + foo = 'bar','','baz'; +}; + + +#line 4 "index.c" +gfunc = { + name = 'xtract'; + what = 'extract text from another file'; + general_use; + exparg = { + arg_name = 'file-name'; + arg_desc = 'name of file with text'; + }; + exparg = { + arg_name = 'marker-fmt'; + arg_desc = 'format for marker text'; + }; + exparg = { + arg_name = 'caveat'; + arg_desc = 'warn about changing marker'; + arg_optional = 'opt'; + }; + exparg = { + arg_name = 'default'; + arg_desc = 'default initial text'; + arg_optional = 'opt'; + }; +}; +_EOF_ + +set -x +${GDexe} output=$testname.out $testname.c || \ + failure running ${GDexe} +cmp -s $testname.test $testname.out || \ + failure "`diff $testname.test $testname.out`" + +# subblock.test ends here diff --git a/getdefs/test/option.test b/getdefs/test/option.test new file mode 100755 index 0000000..83c438c --- /dev/null +++ b/getdefs/test/option.test @@ -0,0 +1,107 @@ +#! /bin/sh +# -*- Mode: Shell-script -*- +# +# option.test --- test option extraction +# +# Author: Bruce Korb <bkorb@gnu.org> +# Time-stamp: "2011-02-02 12:04:43 bkorb" +## +## This file is part of AutoGen. +## AutoGen Copyright (c) 1992-2012 by Bruce Korb - all rights reserved +## +## AutoGen 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. +## +## AutoGen 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/>. + +# Common definitions +if test -z "$srcdir"; then + srcdir=`echo "$0" | ${SED} 's,[^/]*$,,'` + test -z "$srcdir" && srcdir=. + test "$srcdir" = "$0" && srcdir=. + test "${VERBOSE+set}" != set && VERBOSE=1 +fi +. $srcdir/defs + +# Create the files we need in the test environment +cat > ${testname}.c <<EOF + +/*=* global + * + * test: subblock + * doc: we want to see + * just what happens +=*/ + +/*=--subblock=exparg=arg_name,arg_desc,arg_optional,arg_list=*/ + +/*=gfunc in_p + * + * exparg: test-string , string to look for + + arg-name + arg-desc + arg-opt + arg-list + + * exparg: @ string-list @ list of strings to check,, @@ list + * + * opt: 1 + * doc: + * Return SCM_BOOL_T if the first argument is duplicated + * in the second (list) argument. +=*/ + SCM +ag_scm_in_p( SCM obj, SCM list ) +{ +} +EOF + +cat > ${testname}.test <<_EOF_ +/* -*- buffer-read-only: t -*- vi: set ro: + * + * + * DO NOT EDIT THIS FILE (option.out) + * + * It has been extracted by getdefs from the following files: + * + * option.c + */ +autogen definitions testdir; + +/* GLOBALDEFS */ + +#line 2 "option.c" + test = 'subblock'; + doc = 'we want to see +just what happens'; + + +#line 11 "option.c" +gfunc = { + name = 'in_p'; + exparg = { + arg_name = 'test-string'; + arg_desc = 'string to look for'; + }; + exparg = { + arg_name = 'string-list'; + arg_desc = 'list of strings to check,,'; + arg_list = 'list'; + }; + opt = '1'; + doc = +'Return SCM_BOOL_T if the first argument is duplicated +in the second (list) argument.'; +}; +_EOF_ +set -x +${GDexe} output=${testname}.out ${testname}.c || \ + failure running ${GDexe} +cmp -s ${testname}.test ${testname}.out || \ + failure "`diff ${testname}.test ${testname}.out`" + +# option.test ends here diff --git a/getdefs/test/subblock.test b/getdefs/test/subblock.test new file mode 100755 index 0000000..8b1eb3c --- /dev/null +++ b/getdefs/test/subblock.test @@ -0,0 +1,105 @@ +#! /bin/sh +# -*- Mode: Shell-script -*- +# +# subblock.test --- test the subblock parameter to getdefs +# +# Author: Bruce Korb <bkorb@gnu.org> +# Time-stamp: "2011-02-02 12:04:51 bkorb" +## +## This file is part of AutoGen. +## AutoGen Copyright (c) 1992-2012 by Bruce Korb - all rights reserved +## +## AutoGen 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. +## +## AutoGen 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/>. + +# Common definitions +if test -z "$srcdir"; then + srcdir=`echo "$0" | ${SED} 's,[^/]*$,,'` + test -z "$srcdir" && srcdir=. + test "$srcdir" = "$0" && srcdir=. + test "${VERBOSE+set}" != set && VERBOSE=1 +fi +. $srcdir/defs + + +# Create the files we need in the test environment +cat > $testname.c <<EOF + +/*=* global + * + * test: subblock + * doc: we want to see + * just what happens +=*/ + +/*=gfunc in_p + * + * exparg: test-string , string to look for + + arg-name + arg-desc + arg-opt + arg-list + + * exparg: @ string-list @ list of strings to check,, @@ list + * + * opt: 1 + * doc: Return SCM_BOOL_T if the first argument is duplicated + * in the second (list) argument. +=*/ + SCM +ag_scm_in_p( SCM obj, SCM list ) +{ +} +EOF + +cat > $testname.test <<_EOF_ +/* -*- buffer-read-only: t -*- vi: set ro: + * + * + * DO NOT EDIT THIS FILE (subblock.out) + * + * It has been extracted by getdefs from the following files: + * + * subblock.c + */ +autogen definitions testdir; + +/* GLOBALDEFS */ + +#line 2 "subblock.c" + test = 'subblock'; + doc = 'we want to see +just what happens'; + + +#line 9 "subblock.c" +gfunc = { + name = 'in_p'; + exparg = { + arg_name = 'test-string'; + arg_desc = 'string to look for'; + }; + exparg = { + arg_name = 'string-list'; + arg_desc = 'list of strings to check,,'; + arg_list = 'list'; + }; + opt = '1'; + doc = 'Return SCM_BOOL_T if the first argument is duplicated +in the second (list) argument.'; +}; +_EOF_ + +${GDexe} subblock=exparg=arg_name,arg_desc,arg_optional,arg_list \ + output=$testname.out $testname.c || \ + failure running ${GDexe} +cmp -s $testname.test $testname.out || \ + failure "`diff $testname.test $testname.out`" + +# subblock.test ends here |