[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[5921] handle install-info --maxwidth
From: |
karl |
Subject: |
[5921] handle install-info --maxwidth |
Date: |
Mon, 10 Nov 2014 18:01:29 +0000 |
Revision: 5921
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5921
Author: karl
Date: 2014-11-10 18:01:28 +0000 (Mon, 10 Nov 2014)
Log Message:
-----------
handle install-info --maxwidth
Modified Paths:
--------------
trunk/ChangeLog
trunk/install-info/install-info.c
trunk/install-info/tests/Makefile.am
Added Paths:
-----------
trunk/install-info/tests/ii-0057-expected-dir-file
trunk/install-info/tests/ii-0057-input-dir-file
trunk/install-info/tests/ii-0057-input-info-file
trunk/install-info/tests/ii-0057-test
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2014-11-09 12:28:41 UTC (rev 5920)
+++ trunk/ChangeLog 2014-11-10 18:01:28 UTC (rev 5921)
@@ -1,3 +1,8 @@
+2014-11-10 Jason Hood <address@hidden> (tiny change)
+
+ * install-info/install-info.c (reformat_new_entries): respect
+ --maxwidth if given.
+
2014-11-09 Gavin Smith <address@hidden>
* info/session.c (find_invocation_node_by_nodename): New
Modified: trunk/install-info/install-info.c
===================================================================
--- trunk/install-info/install-info.c 2014-11-09 12:28:41 UTC (rev 5920)
+++ trunk/install-info/install-info.c 2014-11-10 18:01:28 UTC (rev 5921)
@@ -1663,8 +1663,7 @@
align = align_cli;
}
- if (maxwidth_cli == -1)
- maxwidth = 79;
+ maxwidth = maxwidth_cli == -1 ? 79 : maxwidth_cli;
format_entry (name, name_len, desc, desc_len, calign, align,
maxwidth, &entry->text, &entry->text_len);
Modified: trunk/install-info/tests/Makefile.am
===================================================================
--- trunk/install-info/tests/Makefile.am 2014-11-09 12:28:41 UTC (rev
5920)
+++ trunk/install-info/tests/Makefile.am 2014-11-10 18:01:28 UTC (rev
5921)
@@ -22,7 +22,7 @@
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-0056-test ii-0057-test
noinst_SCRIPTS=$(TESTS)
@@ -247,5 +247,9 @@
ii-0056-input-dir-file \
ii-0056-input-info-file \
ii-0056-expected-dir-file \
-ii-0056-test \
+ii-0057-test \
+ii-0057-input-dir-file \
+ii-0057-input-info-file \
+ii-0057-expected-dir-file \
+ii-0057-test \
README
Added: trunk/install-info/tests/ii-0057-expected-dir-file
===================================================================
--- trunk/install-info/tests/ii-0057-expected-dir-file
(rev 0)
+++ trunk/install-info/tests/ii-0057-expected-dir-file 2014-11-10 18:01:28 UTC
(rev 5921)
@@ -0,0 +1,25 @@
+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:
+
+Animals
+* Aardvark: (aardvark). Medium-sized African mammal.
+* Baboon: (baboon). A monkey from Africa.
+* Chameleon: (chameleon). A lizard from Africa.
+* Deer: (deer). Ruminent antlered mammal.
+* Emu: (emu). A flightless bird from Australia.
+* Fisher: (fisher). A marten from North America.
+* Gnu: (gnu). Wildebeest native
+ to Africa.
Added: trunk/install-info/tests/ii-0057-input-dir-file
===================================================================
--- trunk/install-info/tests/ii-0057-input-dir-file
(rev 0)
+++ trunk/install-info/tests/ii-0057-input-dir-file 2014-11-10 18:01:28 UTC
(rev 5921)
@@ -0,0 +1,23 @@
+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:
+
+Animals
+* Aardvark: (aardvark). Medium-sized African mammal.
+* Baboon: (baboon). A monkey from Africa.
+* Chameleon: (chameleon). A lizard from Africa.
+* Deer: (deer). Ruminent antlered mammal.
+* Emu: (emu). A flightless bird from Australia.
+* Fisher: (fisher). A marten from North America.
Added: trunk/install-info/tests/ii-0057-input-info-file
===================================================================
--- trunk/install-info/tests/ii-0057-input-info-file
(rev 0)
+++ trunk/install-info/tests/ii-0057-input-info-file 2014-11-10 18:01:28 UTC
(rev 5921)
@@ -0,0 +1,12 @@
+INFO-DIR-SECTION Animals
+START-INFO-DIR-ENTRY
+* Gnu: (gnu). 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.)
Added: trunk/install-info/tests/ii-0057-test
===================================================================
--- trunk/install-info/tests/ii-0057-test (rev 0)
+++ trunk/install-info/tests/ii-0057-test 2014-11-10 18:01:28 UTC (rev
5921)
@@ -0,0 +1,27 @@
+#!/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
+
+# test of --maxwidth.
+testnum=0057
+
+outputdirfile=`mktemp ii$testnum-XXXXXXXX`
+cp ${testdir}/ii-$testnum-input-dir-file $outputdirfile || exit 1
+
+${install_info} \
+ --maxwidth=50 \
+ ${testdir}/ii-$testnum-input-info-file $outputdirfile \
+|| exit $?
+
+diff ${testdir}/ii-$testnum-expected-dir-file $outputdirfile
+retval=$?
+
+rm -f $outputdirfile
+exit $retval
Property changes on: trunk/install-info/tests/ii-0057-test
___________________________________________________________________
Added: svn:executable
+ *
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [5921] handle install-info --maxwidth,
karl <=