From: Stefano Lattarini Date: Mon, 31 Dec 2012 12:30:51 +0000 (+0100) Subject: tests: enhance and tweak some texinfo tests X-Git-Tag: v1.13.1~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=924ef267ffd8602dcc0be71c589655812fbe4d85;p=thirdparty%2Fautomake.git tests: enhance and tweak some texinfo tests * t/txinfo-subdir-pr343.sh: Move the tests checking that '.info.bak' files in subdirs are not unduly distributed into ... * t/txinfo-no-extra-dist.sh: ... in here. Enhance a little while at it. * t/txinfo-other-suffixes.sh: Also check that the '.texinfo' suffix is accepted and works. * t/txinfo-setfilename-suffix-match.sh: Remove useless call to autoconf, enhance a little. Signed-off-by: Stefano Lattarini --- diff --git a/t/txinfo-no-extra-dist.sh b/t/txinfo-no-extra-dist.sh index c5e0e4723..ea8f89e3c 100755 --- a/t/txinfo-no-extra-dist.sh +++ b/t/txinfo-no-extra-dist.sh @@ -14,8 +14,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -# Test to ensure that a ".info~" file doesn't end up in the -# distribution. Bug report from Greg McGary. +# Test to ensure that a ".info~" or ".info.bak" file doesn't end up +# in the distribution. Bug report from Greg McGary. . test-init.sh @@ -24,22 +24,36 @@ AC_OUTPUT END cat > Makefile.am << 'END' -info_TEXINFOS = textutils.texi -.PHONY: test -test: +info_TEXINFOS = textutils.texi subdir/main.texi +test: distdir @echo DISTFILES = $(DISTFILES) - case '$(DISTFILES)' in *'~'*) exit 1;; *) exit 0;; esac + @case '$(DISTFILES)' in *'~'*|*'.bak'*) exit 1;; *) exit 0;; esac + st=0; \ + find $(distdir) | grep '~' && st=1; \ + find $(distdir) | grep '\.bak' && st=1; \ + exit $$st +PHONY: test END : > texinfo.tex +mkdir subdir echo '@setfilename textutils.info' > textutils.texi -: > textutils.info~ +echo '@setfilename main.info' > subdir/main.texi $ACLOCAL $AUTOCONF $AUTOMAKE ./configure +: > textutils.info +: > subdir/main.info +: > textutils.info~ +: > textutils.info.bak +: > subdir/main.info~ +: > subdir/main.info.bak $MAKE test +$MAKE maintainer-clean +test -f subdir/main.info~ +test -f subdir/main.info.bak : diff --git a/t/txinfo-other-suffixes.sh b/t/txinfo-other-suffixes.sh index 549ead8b8..5af43768e 100755 --- a/t/txinfo-other-suffixes.sh +++ b/t/txinfo-other-suffixes.sh @@ -19,15 +19,17 @@ . test-init.sh cat > Makefile.am << 'END' -info_TEXINFOS = foo.txi +info_TEXINFOS = foo.txi bar.texinfo END echo '@setfilename foo.info' > foo.txi +echo '@setfilename bar.info' > bar.texinfo : > texinfo.tex $ACLOCAL $AUTOMAKE grep '^\.txi\.info: *$' Makefile.in +grep '^\.texinfo\.info: *$' Makefile.in : diff --git a/t/txinfo-setfilename-suffix-match.sh b/t/txinfo-setfilename-suffix-match.sh index 567e28f40..8526d5381 100755 --- a/t/txinfo-setfilename-suffix-match.sh +++ b/t/txinfo-setfilename-suffix-match.sh @@ -14,7 +14,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -# Make sure file extensions are matched correctly. +# Make sure file extensions are matched correctly in the code +# parsing texi files for @setfilename declarations. # Report from Eric Dorland. . test-init.sh @@ -25,5 +26,8 @@ cat >bar.texi <. # Check for subdir Texinfo (PR/343). -# Also make sure we do not distribute too much foo.info* files (Report -# from Vincent Lefevre). required='makeinfo tex texi2dvi' . test-init.sh @@ -29,8 +27,6 @@ subdir_main_TEXINFOS = subdir/inc.texi installcheck-local: test -f "$(infodir)/main.info" -check-local: - test ! -f $(srcdir)/subdir/main.info.bak END mkdir subdir @@ -50,8 +46,6 @@ cat > subdir/inc.texi << 'END' I'm included. END -touch subdir/main.info.bak - $ACLOCAL $AUTOMAKE --add-missing $AUTOCONF @@ -62,6 +56,5 @@ cd build $MAKE distcheck test -f ../subdir/main.info test ! -e subdir/main.info -test -f ../subdir/main.info.bak :