[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[FYI] {maint} tests: enhance and tweak some texinfo tests
From: |
Stefano Lattarini |
Subject: |
[FYI] {maint} tests: enhance and tweak some texinfo tests |
Date: |
Mon, 31 Dec 2012 13:31:58 +0100 |
* 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 <address@hidden>
---
t/txinfo-no-extra-dist.sh | 28 +++++++++++++++++++++-------
t/txinfo-other-suffixes.sh | 4 +++-
t/txinfo-setfilename-suffix-match.sh | 8 ++++++--
t/txinfo-subdir-pr343.sh | 7 -------
4 files changed, 30 insertions(+), 17 deletions(-)
diff --git a/t/txinfo-no-extra-dist.sh b/t/txinfo-no-extra-dist.sh
index c5e0e47..ea8f89e 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 <http://www.gnu.org/licenses/>.
-# 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 549ead8..5af4376 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 567e28f..8526d53 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 <http://www.gnu.org/licenses/>.
-# 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 <<EOF
EOF
$ACLOCAL
-$AUTOCONF
$AUTOMAKE --add-missing
+
+$EGREP '[ /]bar-1\.9\.info( |$)' Makefile.in
+
+:
diff --git a/t/txinfo-subdir-pr343.sh b/t/txinfo-subdir-pr343.sh
index 374c44a..0ecb4bf 100755
--- a/t/txinfo-subdir-pr343.sh
+++ b/t/txinfo-subdir-pr343.sh
@@ -15,8 +15,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# 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
:
--
1.8.1.rc3.27.g3b73c7d
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [FYI] {maint} tests: enhance and tweak some texinfo tests,
Stefano Lattarini <=