diff options
Diffstat (limited to 'gnu/usr.bin/texinfo/makeinfo/tests')
26 files changed, 718 insertions, 0 deletions
diff --git a/gnu/usr.bin/texinfo/makeinfo/tests/Makefile.am b/gnu/usr.bin/texinfo/makeinfo/tests/Makefile.am new file mode 100644 index 00000000000..3e502ed4f32 --- /dev/null +++ b/gnu/usr.bin/texinfo/makeinfo/tests/Makefile.am @@ -0,0 +1,18 @@ +## Makefile.am for texinfo/tests/makeinfo. +## Run automake in ../.. to produce Makefile.in from this. + +TESTS = cond \ + html-extrali html-min html-manuals html-para html-title \ + menu-whitespace \ + no-headers \ + node-expand node-value node-whitespace \ + top top2 + +noinst_SCRIPTS = $(TESTS) + +EXTRA_DIST = $(noinst_SCRIPTS) \ + cond.txi \ + html-extrali.txi html-min.txi html-para.txi html-title.txi \ + menu-whitespace.txi \ + node-expand.txi node-value.txi node-whitespace.txi \ + top.txi top2.txi diff --git a/gnu/usr.bin/texinfo/makeinfo/tests/Makefile.in b/gnu/usr.bin/texinfo/makeinfo/tests/Makefile.in new file mode 100644 index 00000000000..50dedc8403c --- /dev/null +++ b/gnu/usr.bin/texinfo/makeinfo/tests/Makefile.in @@ -0,0 +1,223 @@ +# Makefile.in generated automatically by automake 1.4 from Makefile.am + +# Copyright (C) 1994, 1995-8, 1999 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. + + +SHELL = @SHELL@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +bindir = @bindir@ +sbindir = @sbindir@ +libexecdir = @libexecdir@ +datadir = @datadir@ +sysconfdir = @sysconfdir@ +sharedstatedir = @sharedstatedir@ +localstatedir = @localstatedir@ +libdir = @libdir@ +infodir = @infodir@ +mandir = @mandir@ +includedir = @includedir@ +oldincludedir = /usr/include + +DESTDIR = + +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ + +top_builddir = ../.. + +ACLOCAL = @ACLOCAL@ +AUTOCONF = @AUTOCONF@ +AUTOMAKE = @AUTOMAKE@ +AUTOHEADER = @AUTOHEADER@ + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +transform = @program_transform_name@ + +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +DATADIRNAME = @DATADIRNAME@ +GENCAT = @GENCAT@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GT_NO = @GT_NO@ +GT_YES = @GT_YES@ +INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@ +INSTOBJEXT = @INSTOBJEXT@ +INTLDEPS = @INTLDEPS@ +INTLLIBS = @INTLLIBS@ +INTLOBJS = @INTLOBJS@ +MAKEINFO = @MAKEINFO@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +PACKAGE = @PACKAGE@ +POFILES = @POFILES@ +POSUB = @POSUB@ +RANLIB = @RANLIB@ +TERMLIBS = @TERMLIBS@ +USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +l = @l@ + +TESTS = cond html-extrali html-min html-manuals html-para html-title menu-whitespace no-headers node-expand node-value node-whitespace top top2 + + +noinst_SCRIPTS = $(TESTS) + +EXTRA_DIST = $(noinst_SCRIPTS) cond.txi html-extrali.txi html-min.txi html-para.txi html-title.txi menu-whitespace.txi node-expand.txi node-value.txi node-whitespace.txi top.txi top2.txi + +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = ../../config.h +CONFIG_CLEAN_FILES = +SCRIPTS = $(noinst_SCRIPTS) + +DIST_COMMON = Makefile.am Makefile.in + + +DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) + +TAR = gtar +GZIP_ENV = --best +all: all-redirect +.SUFFIXES: +$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps makeinfo/tests/Makefile + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) \ + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status + +tags: TAGS +TAGS: + + +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) + +subdir = makeinfo/tests + +distdir: $(DISTFILES) + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ + cp -pr $$d/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ + || cp -p $$d/$$file $(distdir)/$$file || :; \ + fi; \ + done +check-TESTS: $(TESTS) + @failed=0; all=0; \ + srcdir=$(srcdir); export srcdir; \ + for tst in $(TESTS); do \ + if test -f $$tst; then dir=.; \ + else dir="$(srcdir)"; fi; \ + if $(TESTS_ENVIRONMENT) $$dir/$$tst; then \ + all=`expr $$all + 1`; \ + echo "PASS: $$tst"; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + failed=`expr $$failed + 1`; \ + echo "FAIL: $$tst"; \ + fi; \ + done; \ + if test "$$failed" -eq 0; then \ + banner="All $$all tests passed"; \ + else \ + banner="$$failed of $$all tests failed"; \ + fi; \ + dashes=`echo "$$banner" | sed s/./=/g`; \ + echo "$$dashes"; \ + echo "$$banner"; \ + echo "$$dashes"; \ + test "$$failed" -eq 0 +info-am: +info: info-am +dvi-am: +dvi: dvi-am +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +installcheck-am: +installcheck: installcheck-am +install-exec-am: +install-exec: install-exec-am + +install-data-am: +install-data: install-data-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am +install: install-am +uninstall-am: +uninstall: uninstall-am +all-am: Makefile $(SCRIPTS) +all-redirect: all-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install +installdirs: + + +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + -rm -f config.cache config.log stamp-h stamp-h[0-9]* + +maintainer-clean-generic: +mostlyclean-am: mostlyclean-generic + +mostlyclean: mostlyclean-am + +clean-am: clean-generic mostlyclean-am + +clean: clean-am + +distclean-am: distclean-generic clean-am + +distclean: distclean-am + +maintainer-clean-am: maintainer-clean-generic distclean-am + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + +maintainer-clean: maintainer-clean-am + +.PHONY: tags distdir check-TESTS info-am info dvi-am dvi check check-am \ +installcheck-am installcheck install-exec-am install-exec \ +install-data-am install-data install-am install uninstall-am uninstall \ +all-redirect all-am all installdirs mostlyclean-generic \ +distclean-generic clean-generic maintainer-clean-generic clean \ +mostlyclean distclean maintainer-clean + + +# 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/gnu/usr.bin/texinfo/makeinfo/tests/cond b/gnu/usr.bin/texinfo/makeinfo/tests/cond new file mode 100644 index 00000000000..30c28bdd25a --- /dev/null +++ b/gnu/usr.bin/texinfo/makeinfo/tests/cond @@ -0,0 +1,32 @@ +#!/bin/sh +# Test conditional text. + +: ${srcdir=.} + +# Default Info output. +../makeinfo -o cond.out $srcdir/cond.txi || exit 1 +egrep 'This is (ifnothtml|ifinfo|ifnottex) text' cond.out >/dev/null \ + || exit 2 +test `fgrep ' text.' cond.out | wc -l` -eq 3 || exit 3 + +# Default HTML output. +../makeinfo --html -o cond.out $srcdir/cond.txi || exit 1 +egrep 'This is (html|ifhtml|ifnotinfo|ifnottex) text' cond.out >/dev/null \ + || exit 2 +test `fgrep ' text.' cond.out | wc -l` -eq 4 || exit 3 + +# --ifhtml off, --ifinfo off, --iftex off. +../makeinfo --no-ifhtml --no-ifinfo --no-iftex -o cond.out $srcdir/cond.txi || exit 1 +egrep 'This is ifnot(html|info|tex) text' cond.out >/dev/null \ + || exit 2 +test `fgrep ' text.' cond.out | wc -l` -eq 3 || exit 3 + +# Do we really need to test all the other permutations? + +# --ifhtml on, --ifinfo on, --iftex on. +../makeinfo --ifhtml --ifinfo --iftex -o cond.out $srcdir/cond.txi || exit 1 +egrep 'This is (html|ifhtml|ifinfo|tex|iftex) text' cond.out >/dev/null \ + || exit 2 +test `fgrep ' text.' cond.out | wc -l` -eq 5 || exit 3 + +rm -f cond.out cond.info diff --git a/gnu/usr.bin/texinfo/makeinfo/tests/cond.txi b/gnu/usr.bin/texinfo/makeinfo/tests/cond.txi new file mode 100644 index 00000000000..b60242322dc --- /dev/null +++ b/gnu/usr.bin/texinfo/makeinfo/tests/cond.txi @@ -0,0 +1,40 @@ +\input texinfo +@setfilename cond.info + +@node Top + +@html +This is html text. +@end html + +@ifhtml +This is ifhtml text. +@end ifhtml + +@ifnothtml +This is ifnothtml text. +@end ifnothtml + + +@ifinfo +This is ifinfo text. +@end ifinfo + +@ifnotinfo +This is ifnotinfo text. +@end ifnotinfo + + +@tex +This is tex text. +@end tex + +@iftex +This is iftex text. +@end iftex + +@ifnottex +This is ifnottex text. +@end ifnottex + +@bye diff --git a/gnu/usr.bin/texinfo/makeinfo/tests/html-extrali b/gnu/usr.bin/texinfo/makeinfo/tests/html-extrali new file mode 100644 index 00000000000..22ecd896ad7 --- /dev/null +++ b/gnu/usr.bin/texinfo/makeinfo/tests/html-extrali @@ -0,0 +1,13 @@ +#!/bin/sh +# Test no extra <li> from @menu. + +li_count=`../makeinfo --html -o - ${srcdir-.}/html-extrali.txi 2>/dev/null \ +| grep '<li>' \ +| wc -l` + +if test "$li_count" -ne 1; then + echo "$li_count <li>s instead of one." >&2 + exit 1 +else + exit 0 +fi diff --git a/gnu/usr.bin/texinfo/makeinfo/tests/html-extrali.txi b/gnu/usr.bin/texinfo/makeinfo/tests/html-extrali.txi new file mode 100644 index 00000000000..281aa7b3193 --- /dev/null +++ b/gnu/usr.bin/texinfo/makeinfo/tests/html-extrali.txi @@ -0,0 +1,11 @@ +\input texinfo +@setfilename menuli.info + +@c extra <li> generated after <menu> +@c From: Marius Groeger <mag@sysgo.de>, 13nov98. + +@menu +* entry1:: +@end menu + +@bye diff --git a/gnu/usr.bin/texinfo/makeinfo/tests/html-manuals b/gnu/usr.bin/texinfo/makeinfo/tests/html-manuals new file mode 100644 index 00000000000..5e9523c820e --- /dev/null +++ b/gnu/usr.bin/texinfo/makeinfo/tests/html-manuals @@ -0,0 +1,12 @@ +#!/bin/sh +# Test that all the distribution manuals can be converted to HTML. + +: ${srcdir=.} + +for manual in info.texi info-stnd.texi texinfo.txi; do + base=`echo $manual | sed 's/\.te*xi$//'` + ../makeinfo --html -I$srcdir/../../doc --no-split \ + $srcdir/../../doc/$manual -o $base.html \ + || exit 1 + rm -f $base.html +done diff --git a/gnu/usr.bin/texinfo/makeinfo/tests/html-min b/gnu/usr.bin/texinfo/makeinfo/tests/html-min new file mode 100644 index 00000000000..e5971530afc --- /dev/null +++ b/gnu/usr.bin/texinfo/makeinfo/tests/html-min @@ -0,0 +1,8 @@ +#!/bin/sh +# Test that a minimal Texinfo file can be converted to HTML. + +../makeinfo --html ${srcdir-.}/html-min.txi +exit_status=$? + +rm -f html-min.html +exit $exit_status diff --git a/gnu/usr.bin/texinfo/makeinfo/tests/html-min.txi b/gnu/usr.bin/texinfo/makeinfo/tests/html-min.txi new file mode 100644 index 00000000000..116519e0611 --- /dev/null +++ b/gnu/usr.bin/texinfo/makeinfo/tests/html-min.txi @@ -0,0 +1,12 @@ +\input texinfo +@setfilename html-min.info +@settitle HTML min test + +@node Top +@top Top of HTML min test + +Top. + +Second paragraph. + +@bye diff --git a/gnu/usr.bin/texinfo/makeinfo/tests/html-para b/gnu/usr.bin/texinfo/makeinfo/tests/html-para new file mode 100644 index 00000000000..ba3191bf18f --- /dev/null +++ b/gnu/usr.bin/texinfo/makeinfo/tests/html-para @@ -0,0 +1,8 @@ +#!/bin/sh +# Test that paragraph beginnings in HTML work ok. + +../makeinfo --html ${srcdir-.}/html-para.txi +exit_status=$? + +rm -f html-para.html +exit $exit_status diff --git a/gnu/usr.bin/texinfo/makeinfo/tests/html-para.txi b/gnu/usr.bin/texinfo/makeinfo/tests/html-para.txi new file mode 100644 index 00000000000..c6e34fd2513 --- /dev/null +++ b/gnu/usr.bin/texinfo/makeinfo/tests/html-para.txi @@ -0,0 +1,24 @@ +\input texinfo +@setfilename html-para.info +@settitle HTML paragraph beginning test + +@c <p> is emitted at paragraph beginning, which makes the text +@c between START and END not exactly what some cm_xxx functions +@c expect, when they are called by pop_and_call_brace. + +@set val @@value@{@} +@definfoenclose foo,\\,// + +@node Top +@top Top of HTML paragraph test + +@value{val} should work at the beginning of a new paragraph. + +@dotless{i} dotless should not trigger error messages at the beginning +of a new paragraph. + +@sc{small-caps} should work at the beginning of a new paragraph. + +@foo{@@definfoenclose} should work at the beginning of a new paragraph. + +@bye diff --git a/gnu/usr.bin/texinfo/makeinfo/tests/html-title b/gnu/usr.bin/texinfo/makeinfo/tests/html-title new file mode 100644 index 00000000000..425226155dd --- /dev/null +++ b/gnu/usr.bin/texinfo/makeinfo/tests/html-title @@ -0,0 +1,13 @@ +#!/bin/sh +# Test that titles with @ commands don't produce markup in the <title>. +# (And that the @ commands get expanded.) + +if ../makeinfo --html ${srcdir-.}/html-title.txi; then + grep '^<title>@[^<>]*</title>$' html-title.html >/dev/null + exit_status=$? +else + exit_status=1 +fi + +#rm -f html-title.html +exit $exit_status diff --git a/gnu/usr.bin/texinfo/makeinfo/tests/html-title.txi b/gnu/usr.bin/texinfo/makeinfo/tests/html-title.txi new file mode 100644 index 00000000000..2e2f25c579f --- /dev/null +++ b/gnu/usr.bin/texinfo/makeinfo/tests/html-title.txi @@ -0,0 +1,12 @@ +\input texinfo +@setfilename html-title.info +@settitle @@title @sc{html} @code{test} + +@node Top +@top Top of @@title @sc{html} @code{test} + +Top. + +Second paragraph. + +@bye diff --git a/gnu/usr.bin/texinfo/makeinfo/tests/menu-whitespace b/gnu/usr.bin/texinfo/makeinfo/tests/menu-whitespace new file mode 100644 index 00000000000..d512fc1bcb9 --- /dev/null +++ b/gnu/usr.bin/texinfo/makeinfo/tests/menu-whitespace @@ -0,0 +1,71 @@ +#!/bin/sh +# Test that a minimal Texinfo file can be converted to HTML. + +: ${srcdir=.} +input=`basename $0`.txi + +../makeinfo -o /dev/null $srcdir/$input +exit $? + +Date: 07 Dec 1998 11:23:44 +0100 +From: Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> +To: bug-texinfo@gnu.org +Subject: Makeinfo mishandles defaulted node links + +The following example demonstrates a bug in makeinfo: + +$ cat top.texi +@setfilename top.info + +@node Top +@top Top + +@menu +* first:: +@end menu + +@node first +@chapter first + +@menu @c +* second:: +@end menu + +@node second +@section second +$ makeinfo top.texi +Making info file `top.info' from `top.texi'. +./top.texi:3: Next field of node `Top' not pointed to. +./top.texi:17: This node (second) has the bad Prev. +makeinfo: Removing output file `/home/as/test/top.info' due to errors; use --force to preserve. + +Makeinfo is being confused by the whitespace after @menu, or rather by its +absence. + + +1998-12-06 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> + + * makeinfo/node.c (cm_node): When searching for @menu don't + require a space after it. + +--- texinfo-3.12b/makeinfo/node.c.~1~ Mon Oct 26 23:14:59 1998 ++++ texinfo-3.12b/makeinfo/node.c Sun Dec 6 00:23:59 1998 +@@ -523,9 +523,10 @@ + orig_size = size_of_input_text; + + input_text_offset = +- search_forward ("\n@menu ", orig_offset); ++ search_forward ("\n@menu", orig_offset); + +- if (input_text_offset > -1) ++ if (input_text_offset > -1 ++ && cr_or_whitespace (input_text[input_text_offset + 6])) + { + char *nodename_from_menu = NULL; + + +-- +Andreas Schwab "And now for something +schwab@issan.cs.uni-dortmund.de completely different" +schwab@gnu.org + diff --git a/gnu/usr.bin/texinfo/makeinfo/tests/menu-whitespace.txi b/gnu/usr.bin/texinfo/makeinfo/tests/menu-whitespace.txi new file mode 100644 index 00000000000..fd1c39f7ebf --- /dev/null +++ b/gnu/usr.bin/texinfo/makeinfo/tests/menu-whitespace.txi @@ -0,0 +1,18 @@ +@setfilename top.info + +@node Top +@top Top + +@menu +* first:: +@end menu + +@node first +@chapter first + +@menu @c +* second:: +@end menu + +@node second +@section second diff --git a/gnu/usr.bin/texinfo/makeinfo/tests/no-headers b/gnu/usr.bin/texinfo/makeinfo/tests/no-headers new file mode 100644 index 00000000000..17570bb6f48 --- /dev/null +++ b/gnu/usr.bin/texinfo/makeinfo/tests/no-headers @@ -0,0 +1,8 @@ +#!/bin/sh +# Test that info.texi works with --no-headers (this includes node +# pointer defaulting). + +: ${srcdir=.} +docdir=$srcdir/../../doc + +../makeinfo --no-headers -o /dev/null -I$docdir info.texi diff --git a/gnu/usr.bin/texinfo/makeinfo/tests/node-expand b/gnu/usr.bin/texinfo/makeinfo/tests/node-expand new file mode 100644 index 00000000000..12a67a43f82 --- /dev/null +++ b/gnu/usr.bin/texinfo/makeinfo/tests/node-expand @@ -0,0 +1,11 @@ +#!/bin/sh +# Test command expansion in node names. + +: ${srcdir=.} + +../makeinfo --commands-in-node-names $srcdir/node-expand.txi +test -s node-expand.info +exit_status=$? + +rm -f node-expand.info +exit $exit_status diff --git a/gnu/usr.bin/texinfo/makeinfo/tests/node-expand.txi b/gnu/usr.bin/texinfo/makeinfo/tests/node-expand.txi new file mode 100644 index 00000000000..42cb614d308 --- /dev/null +++ b/gnu/usr.bin/texinfo/makeinfo/tests/node-expand.txi @@ -0,0 +1,64 @@ +\input texinfo.tex @c -*-texinfo-*- + +@setfilename node-expand.info + +@c Makeinfo should expand non-macros such as @@ and @value +@c in node names and node references, including menus. +@c This file deliberately references "Node 1" both via +@c @value and directly; this should not trigger any errors, +@c as long as --commands-in-node-names is used. +@c Index entries should all be expanded as well. + +@set node1 Node 1 + +@ifnottex + +@node Top, (dir), (dir), (dir) +@top + +@end ifnottex + +@menu +* @value{node1} :: +* @@node `2':: +* ``node'' with---tricks:: +@end menu + +@xref{@@node `2'}. + +@node @value{node1}, @@node `2', Top, Top +@chapter Chapter 1 + +@cindex entry for chapter 1 +This is chapter 1. +@xref{@@node `2'}. + +@set sec1 Section 1.1 + +@menu +* @value{sec1}:: +@end menu + +@node Section 1.1, , Node 1, Node 1 +@comment node-name, next, previous, up + +@cindex entry for section 1.1 +This is section 1.1. + +@node @@node `2', ``node'' with---tricks, @value{node1}, Top +@comment node-name, next, previous, up +@chapter Node 2 + +@cindex entry for chapter 2 +This is chapter 2. +@xref{@value{node1}}. @xref{Node 1}. +@xref{``node'' with---tricks, Node with some tricks}. + +@node ``node'' with---tricks, , @@node `2', Top + +@cindex tricks +Another node. + +@printindex cp + +@bye diff --git a/gnu/usr.bin/texinfo/makeinfo/tests/node-value b/gnu/usr.bin/texinfo/makeinfo/tests/node-value new file mode 100644 index 00000000000..90c250bc17b --- /dev/null +++ b/gnu/usr.bin/texinfo/makeinfo/tests/node-value @@ -0,0 +1,11 @@ +#!/bin/sh +# Test @value expansion in node names. + +: ${srcdir=.} + +../makeinfo $srcdir/node-value.txi +grep -v "No Value" node-value.info >/dev/null +exit_status=$? + +rm -f node-value.info +exit $exit_status diff --git a/gnu/usr.bin/texinfo/makeinfo/tests/node-value.txi b/gnu/usr.bin/texinfo/makeinfo/tests/node-value.txi new file mode 100644 index 00000000000..ba1173f9a89 --- /dev/null +++ b/gnu/usr.bin/texinfo/makeinfo/tests/node-value.txi @@ -0,0 +1,15 @@ +\input texinfo +@setfilename node-value.info +@set a--foo bar + +@node Top, @value{a--foo}, (dir), (dir) +@top Var @value{a--foo} +@value{a--foo} + +@node @value{a--foo}, BarFoo, Top, (dir) +@chapter BarFoo + +@node BarFoo, , @value{a--foo}, (dir) +@chapter bar + +@bye diff --git a/gnu/usr.bin/texinfo/makeinfo/tests/node-whitespace b/gnu/usr.bin/texinfo/makeinfo/tests/node-whitespace new file mode 100644 index 00000000000..7cb568554dc --- /dev/null +++ b/gnu/usr.bin/texinfo/makeinfo/tests/node-whitespace @@ -0,0 +1,11 @@ +#!/bin/sh +# Test whitespace collapse in node names. + +: ${srcdir=.} + +../makeinfo $srcdir/node-whitespace.txi +test -s node-whitespace.info +exit_status=$? + +rm -f node-whitespace.info +exit $exit_status diff --git a/gnu/usr.bin/texinfo/makeinfo/tests/node-whitespace.txi b/gnu/usr.bin/texinfo/makeinfo/tests/node-whitespace.txi new file mode 100644 index 00000000000..df1253fc507 --- /dev/null +++ b/gnu/usr.bin/texinfo/makeinfo/tests/node-whitespace.txi @@ -0,0 +1,30 @@ +\input texinfo.tex @c -*-texinfo-*- + +@setfilename node-whitespace.info + +@c Makeinfo should collapse whitespace in node names. + +@ifnottex + +@node Top +@top + +@end ifnottex + +@menu +* Chap 1.3 :: +* Chap 1.4 :Chap 1.4. +@end menu + +@node Chap 1.3 +@chapter Chap 1.3 + +Can I reach here? + +@node Chap 1.4 +@chapter Another space test + +How about here? +@xref{Chap 1.3}. + +@bye diff --git a/gnu/usr.bin/texinfo/makeinfo/tests/top b/gnu/usr.bin/texinfo/makeinfo/tests/top new file mode 100644 index 00000000000..852194a71cd --- /dev/null +++ b/gnu/usr.bin/texinfo/makeinfo/tests/top @@ -0,0 +1,10 @@ +#!/bin/sh +# Test that a top node can be ignored. + +: ${srcdir=.} +../makeinfo $srcdir/top.txi || exit 1 + +# Expected warnings due to use of @ifinfo instead of @ifnottex. +../makeinfo --no-split --no-warn --html $srcdir/top.txi -o top.html || exit 1 + +rm -f top*.html top.info diff --git a/gnu/usr.bin/texinfo/makeinfo/tests/top.txi b/gnu/usr.bin/texinfo/makeinfo/tests/top.txi new file mode 100644 index 00000000000..e8c3cbbc078 --- /dev/null +++ b/gnu/usr.bin/texinfo/makeinfo/tests/top.txi @@ -0,0 +1,25 @@ +\input texinfo +@setfilename top.info +@settitle top test + +@c This traditional top node uses @ifinfo for testing. +@c Therefore there will be warnings when processing with --html. +@c The solution is to use @ifnottex instead. + +@ifinfo +@node Top +@top Top test + +Typical top node. +@end ifinfo + +@menu +* Subnode:: +@end menu + +@node Subnode +@chapter Subnode + +Subnode. + +@bye diff --git a/gnu/usr.bin/texinfo/makeinfo/tests/top2 b/gnu/usr.bin/texinfo/makeinfo/tests/top2 new file mode 100644 index 00000000000..d38984654d5 --- /dev/null +++ b/gnu/usr.bin/texinfo/makeinfo/tests/top2 @@ -0,0 +1,11 @@ +#!/bin/sh +# Test that a bare top node does not crash with --html. + +: ${srcdir=.} + +# But this input file is erroneous, so throw away errors. +../makeinfo --force -o top2.html --html $srcdir/top2.txi 2>/dev/null +test -s top2.html +exit_status=$? +rm -f top2.html +exit $exit_status diff --git a/gnu/usr.bin/texinfo/makeinfo/tests/top2.txi b/gnu/usr.bin/texinfo/makeinfo/tests/top2.txi new file mode 100644 index 00000000000..ade7214b0c2 --- /dev/null +++ b/gnu/usr.bin/texinfo/makeinfo/tests/top2.txi @@ -0,0 +1,7 @@ +\input texinfo +@setfilename top.info + +@node start +@top + +@bye |