automake-ng
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-NG] [PATCH 18/26] [ng] coverage: texinfo input files using @in


From: Stefano Lattarini
Subject: [Automake-NG] [PATCH 18/26] [ng] coverage: texinfo input files using @include directives
Date: Sat, 16 Jun 2012 23:30:05 +0200

Both in-tree and VPATH builds, and both top-level and subdir input.

* t/txinfo-include.sh: New test.

Signed-off-by: Stefano Lattarini <address@hidden>
---
 t/txinfo-include.sh |  164 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 164 insertions(+)
 create mode 100755 t/txinfo-include.sh

diff --git a/t/txinfo-include.sh b/t/txinfo-include.sh
new file mode 100755
index 0000000..017405f
--- /dev/null
+++ b/t/txinfo-include.sh
@@ -0,0 +1,164 @@
+#! /bin/sh
+# Copyright (C) 2012 Free Software Foundation, Inc.
+#
+# 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, 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/>.
+
+# Texinfo input files using @include directives.  Check both in-tree
+# and VPATH builds, and both top-level and subdir input.
+
+required='makeinfo tex texi2dvi'
+. ./defs || Exit 1
+
+echo AC_OUTPUT >> configure.ac
+
+cat > Makefile.am << 'END'
+info_TEXINFOS = main.texi sub/more.texi
+main_TEXINFOS = one.texi two.texi three.texi
+sub_more_TEXINFOS = sub/one.texi sub/two.texi
+END
+
+cat > main.texi << 'END'
+\input texinfo
address@hidden main.info
address@hidden main
address@hidden
address@hidden Top
address@hidden GNU dummy.
address@hidden
+* one::   Chapter one
+* two::   Chapter two
+* three:: Chapter three
address@hidden menu
address@hidden ifnottex
address@hidden one.texi
address@hidden two.texi
address@hidden three.texi
address@hidden
+END
+
+cat > one.texi << 'END'
address@hidden one
address@hidden Chapter one
+Foo bar, baz.
+END
+
+cat > two.texi << 'END'
address@hidden two
address@hidden Chapter two
+Blah Blah Blah.
+END
+
+cat > three.texi << 'END'
address@hidden three
address@hidden Chapter two
+Gnu's Not Unix.
+END
+
+mkdir sub
+
+cat > sub/more.texi << 'END'
+\input texinfo
address@hidden more.info
address@hidden main
address@hidden
address@hidden Top
address@hidden GNU more.
address@hidden
+* desc:: Description of this program
+* hist:: History of this program
address@hidden menu
address@hidden ifnottex
address@hidden one.texi
address@hidden two.texi
address@hidden
+END
+
+cat > sub/one.texi << 'END'
address@hidden desc
address@hidden Description of this program
+It does something, really.
+END
+
+cat > sub/two.texi << 'END'
address@hidden hist
address@hidden History of this program
+It was written somehow.
+END
+
+cat > exp << 'END'
+./main.info
+./sub/more.info
+END
+
+check_info_contents ()
+{
+  srcdir=${1-.}
+  $FGREP "Foo bar, baz."                        $srcdir/main.info
+  $FGREP "Blah Blah Blah."                      $srcdir/main.info
+  $FGREP "Gnu's Not Unix."                      $srcdir/main.info
+  $FGREP 'It does something, really.'           $srcdir/sub/more.info
+  $FGREP 'It was written somehow.'              $srcdir/sub/more.info
+}
+
+get_info_names ()
+{
+  find ${1-.} -type f | grep '\.info$' | LC_ALL=C sort > got
+}
+
+check_expected ()
+{
+  cat exp
+  cat got
+  diff exp got
+}
+
+$ACLOCAL
+$AUTOMAKE --add-missing
+$AUTOCONF
+
+./configure
+
+$MAKE info
+get_info_names
+check_expected
+
+check_info_contents
+
+$MAKE dvi
+test -f main.dvi
+test -f sub/more.dvi
+
+$MAKE maintainer-clean
+test ! -f main.dvi
+test ! -f sub/more.dvi
+test ! -f main.info
+test ! -f sub/more.info
+
+mkdir build
+cd build
+../configure
+$MAKE all dvi
+
+get_info_names ..
+sed 's|^\./|../|' ../exp > exp
+check_expected
+
+test -f main.dvi
+test -f sub/more.dvi
+
+check_info_contents ..
+
+$MAKE distcheck
+
+:
-- 
1.7.9.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]