texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * install-info/tests/ii-0058-test, * install-info


From: Gavin D. Smith
Subject: branch master updated: * install-info/tests/ii-0058-test, * install-info/tests/ii-0059-test: Add new tests to check blank lines between sections on repeated addition and deletion of sections.
Date: Sun, 13 Aug 2023 08:29:56 -0400

This is an automated email from the git hooks/post-receive script.

gavin pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new e098321707 * install-info/tests/ii-0058-test, * 
install-info/tests/ii-0059-test: Add new tests to check blank lines between 
sections on repeated addition and deletion of sections.
e098321707 is described below

commit e098321707f2434cb4fd2c7214d0d2de49238655
Author: John Wheeler <wheelerwjx9@runbox.com>
AuthorDate: Sun Aug 13 13:28:11 2023 +0100

    * install-info/tests/ii-0058-test,
    * install-info/tests/ii-0059-test: Add new tests to check
    blank lines between sections on repeated addition and deletion of
    sections.
---
 ChangeLog                                    |  7 ++++
 install-info/tests/Makefile.am               | 10 +++++-
 install-info/tests/README                    |  4 +++
 install-info/tests/ii-0058-expected-dir-file | 19 ++++++++++
 install-info/tests/ii-0058-input-dir-file    |  0
 install-info/tests/ii-0058-input-info-file   | 11 ++++++
 install-info/tests/ii-0058-test              | 52 ++++++++++++++++++++++++++++
 install-info/tests/ii-0059-expected-dir-file | 43 +++++++++++++++++++++++
 install-info/tests/ii-0059-input-dir-file    | 47 +++++++++++++++++++++++++
 install-info/tests/ii-0059-input-info-file   | 11 ++++++
 install-info/tests/ii-0059-test              | 28 +++++++++++++++
 11 files changed, 231 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 5a4479d875..0a12a8e557 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2023-08-13  John Wheeler <wheelerwjx9@runbox.com>
+
+       * install-info/tests/ii-0058-test,
+       * install-info/tests/ii-0059-test: Add new tests to check
+       blank lines between sections on repeated addition and deletion of
+       sections.
+
 2023-08-12  Gavin Smith <gavinsmith0123@gmail.com>
 
        * info/terminal.c (term_Km): Remove.
diff --git a/install-info/tests/Makefile.am b/install-info/tests/Makefile.am
index 4f954dd6dc..2269389d40 100644
--- a/install-info/tests/Makefile.am
+++ b/install-info/tests/Makefile.am
@@ -21,7 +21,7 @@ ii-0036-test ii-0037-test ii-0038-test ii-0039-test 
ii-0040-test \
 ii-0041-test ii-0042-test ii-0043-test ii-0044-test ii-0045-test \
 ii-0046-test ii-0047-test ii-0048-test ii-0049-test ii-0050-test \
 ii-0051-test ii-0052-test ii-0053-test ii-0054-test ii-0055-test \
-ii-0056-test ii-0057-test
+ii-0056-test ii-0057-test ii-0058-test ii-0059-test
 
 noinst_SCRIPTS=$(TESTS)
 
@@ -252,4 +252,12 @@ ii-0056-expected-dir-file \
 ii-0057-input-dir-file \
 ii-0057-input-info-file \
 ii-0057-expected-dir-file \
+\
+ii-0058-input-dir-file \
+ii-0058-input-info-file \
+ii-0058-expected-dir-file \
+\
+ii-0059-input-dir-file \
+ii-0059-input-info-file \
+ii-0059-expected-dir-file \
 README
diff --git a/install-info/tests/README b/install-info/tests/README
index 634c71c851..443092793f 100644
--- a/install-info/tests/README
+++ b/install-info/tests/README
@@ -176,3 +176,7 @@ This file describes each of the numbered install-info tests.
 0055: --defsection when its value is used
 0056: --defsection when its value is not used
 0057: --maxwidth
+0058: Repeated deletion and addition of a section does not introduce
+      extra blank lines.
+0059: Deletion of section between two other sections leaves one
+      blank line between the remaining sections.
diff --git a/install-info/tests/ii-0058-expected-dir-file 
b/install-info/tests/ii-0058-expected-dir-file
new file mode 100644
index 0000000000..8eeb85fa8e
--- /dev/null
+++ b/install-info/tests/ii-0058-expected-dir-file
@@ -0,0 +1,19 @@
+This is the file .../info/dir, which contains the
+topmost node of the Info hierarchy, called (dir)Top.
+The first time you invoke Info you start off looking at this node.
+
+File: dir,     Node: Top       This is the top of the INFO tree
+
+  This (the Directory node) gives a menu of major topics.
+  Typing "q" exits, "H" lists all Info commands, "d" returns here,
+  "h" gives a primer for first-timers,
+  "mEmacs<Return>" visits the Emacs manual, etc.
+
+  In Emacs, you can click mouse button 2 on a menu item or cross reference
+  to select it.
+
+* Menu:
+
+Animals
+* Gnu: (ii-0058-input-info-file).
+                                Wildebeest native to Africa.
diff --git a/install-info/tests/ii-0058-input-dir-file 
b/install-info/tests/ii-0058-input-dir-file
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/install-info/tests/ii-0058-input-info-file 
b/install-info/tests/ii-0058-input-info-file
new file mode 100644
index 0000000000..ab8c50ddf3
--- /dev/null
+++ b/install-info/tests/ii-0058-input-info-file
@@ -0,0 +1,11 @@
+INFO-DIR-SECTION Animals
+START-INFO-DIR-ENTRY
+* Gnu: (ii-0058-input-info-file).                    Wildebeest native to 
Africa.
+END-INFO-DIR-ENTRY
+
+File: gnu,  Node: Top,  Next: Top,  Up: (dir)
+
+Gnu
+***
+
+The wildebeest (plural, wildebeest or wildebeests), also called the gnu 
(pronounced /ˈnuː/ or /ˈnjuː/), is an antelope of the genus Connochaetes. It is 
a hooved (ungulate) mammal.  (Taken from wikepedia.)
diff --git a/install-info/tests/ii-0058-test b/install-info/tests/ii-0058-test
new file mode 100755
index 0000000000..1f800262c7
--- /dev/null
+++ b/install-info/tests/ii-0058-test
@@ -0,0 +1,52 @@
+#!/bin/sh -x
+# This file is free software; as a special exception the author 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.
+
+. ./defs || exit 1
+
+outputdirfile=`mktemp ii58-XXXXXXXX`
+cp ${testdir}/ii-0058-input-dir-file $outputdirfile
+if [ "x$?" != "x0" ]; then
+  exit 1
+fi
+
+${install_info} ${testdir}/ii-0058-input-info-file $outputdirfile
+retval=$?
+if [ "x$retval" != "x0" ]; then
+  exit $retval
+fi
+
+${install_info} --delete ${testdir}/ii-0058-input-info-file $outputdirfile
+retval=$?
+if [ "x$retval" != "x0" ]; then
+  exit $retval
+fi
+
+${install_info} ${testdir}/ii-0058-input-info-file $outputdirfile
+retval=$?
+if [ "x$retval" != "x0" ]; then
+  exit $retval
+fi
+
+${install_info} --remove ${testdir}/ii-0058-input-info-file $outputdirfile
+retval=$?
+if [ "x$retval" != "x0" ]; then
+  exit $retval
+fi
+
+${install_info} ${testdir}/ii-0058-input-info-file $outputdirfile
+retval=$?
+if [ "x$retval" != "x0" ]; then
+  exit $retval
+fi
+
+${diff} ${testdir}/ii-0058-expected-dir-file $outputdirfile
+retval=$?
+
+rm -f $outputdirfile
+exit $retval
diff --git a/install-info/tests/ii-0059-expected-dir-file 
b/install-info/tests/ii-0059-expected-dir-file
new file mode 100644
index 0000000000..730e5fd7e8
--- /dev/null
+++ b/install-info/tests/ii-0059-expected-dir-file
@@ -0,0 +1,43 @@
+This is the directory file `dir' a.k.a. `DIR', which contains the
+  topmost node of the Info hierarchy.
+
+
+File: dir,     Node: Top,      This is the top of the INFO tree.
+
+This is the Info main menu (aka directory node).
+A few useful Info commands:
+
+  `q' quits;
+  `?' lists all Info commands;
+  `h' starts the Info tutorial;
+  `mTexinfo RET' visits the Texinfo manual, etc.
+
+* Menu:
+
+Astronomy
+* Mars: (mars).                 Postcards from the Red Planet.
+
+Biology
+* Alien Autopsy: (mars).        A biological account of an alien autopsy.
+
+Chemistry
+* Making Gold: (gold).          How to turn lead into gold.
+
+Dentistry
+* On the Cheap: (dentistry).    Do it yourself dentistry made easy.
+
+Education
+* Dog Training: (dogs).         Teaching old dogs new tricks.
+
+Forestry
+* The Last Tree: (forest).      Clear cutting practises in North America.
+
+History
+* The Fall of Proprietary Software: (gnu).
+                                How the world came to reject slavery.
+
+Immunology
+* Beating the flu: (flu).       Three simple steps to beating influenza.
+
+Jekyllism
+* Science Gone Mad (hyde).      A personal account of self-medication.
diff --git a/install-info/tests/ii-0059-input-dir-file 
b/install-info/tests/ii-0059-input-dir-file
new file mode 100644
index 0000000000..ded24c9588
--- /dev/null
+++ b/install-info/tests/ii-0059-input-dir-file
@@ -0,0 +1,47 @@
+This is the directory file `dir' a.k.a. `DIR', which contains the
+  topmost node of the Info hierarchy.
+
+
+File: dir,     Node: Top,      This is the top of the INFO tree.
+
+This is the Info main menu (aka directory node).
+A few useful Info commands:
+
+  `q' quits;
+  `?' lists all Info commands;
+  `h' starts the Info tutorial;
+  `mTexinfo RET' visits the Texinfo manual, etc.
+
+* Menu:
+
+Astronomy
+* Mars: (mars).                 Postcards from the Red Planet.
+
+Biology
+* Alien Autopsy: (mars).        A biological account of an alien autopsy.
+
+Chemistry
+* Making Gold: (gold).          How to turn lead into gold.
+
+Dentistry
+* On the Cheap: (dentistry).    Do it yourself dentistry made easy.
+
+Education
+* Dog Training: (dogs).         Teaching old dogs new tricks.
+
+Forestry
+* The Last Tree: (forest).      Clear cutting practises in North America.
+
+Geography
+* The Dark Continent: (ii-0059-input-info-file).
+                                A complete and total history.
+
+History
+* The Fall of Proprietary Software: (gnu).
+                                How the world came to reject slavery.
+
+Immunology
+* Beating the flu: (flu).       Three simple steps to beating influenza.
+
+Jekyllism
+* Science Gone Mad (hyde).      A personal account of self-medication.
diff --git a/install-info/tests/ii-0059-input-info-file 
b/install-info/tests/ii-0059-input-info-file
new file mode 100644
index 0000000000..0d399bb8e8
--- /dev/null
+++ b/install-info/tests/ii-0059-input-info-file
@@ -0,0 +1,11 @@
+INFO-DIR-SECTION Geography
+START-INFO-DIR-ENTRY
+* The Dark Continent (ii-0059-input-info-file).   A complete and total history.
+END-INFO-DIR-ENTRY
+
+File: gnu,  Node: Top,  Next: Top,  Up: (dir)
+
+Gnu
+***
+
+The wildebeest (plural, wildebeest or wildebeests), also called the gnu 
(pronounced /ˈnuː/ or /ˈnjuː/), is an antelope of the genus Connochaetes. It is 
a hooved (ungulate) mammal.  (Taken from wikepedia.)
diff --git a/install-info/tests/ii-0059-test b/install-info/tests/ii-0059-test
new file mode 100755
index 0000000000..c30e3fe89b
--- /dev/null
+++ b/install-info/tests/ii-0059-test
@@ -0,0 +1,28 @@
+#!/bin/sh -x
+# This file is free software; as a special exception the author 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.
+
+. ./defs || exit 1
+
+outputdirfile=`mktemp ii59-XXXXXXXX`
+cp ${testdir}/ii-0059-input-dir-file $outputdirfile
+if [ "x$?" != "x0" ]; then
+  exit 1
+fi
+
+${install_info} --remove ${testdir}/ii-0059-input-info-file $outputdirfile
+retval=$?
+if [ "x$retval" != "x0" ]; then
+  exit $retval
+fi
+
+${diff} ${testdir}/ii-0059-expected-dir-file $outputdirfile
+retval=$?
+
+rm -f $outputdirfile
+exit $retval



reply via email to

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