texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: Handle index entries beginning (


From: Gavin D. Smith
Subject: branch master updated: Handle index entries beginning (
Date: Fri, 18 Mar 2022 15:35:41 -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 0c373726b2 Handle index entries beginning (
0c373726b2 is described below

commit 0c373726b2003993844cfa2a89c30bff7eb2d5d1
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Fri Mar 18 19:35:31 2022 +0000

    Handle index entries beginning (
    
    * info/scan.c (scan_reference_label): If label is in an index, do
    not check for a bracketed filename.  This supports index entries
    beginning with a '(' character.  This should allow practically
    any character to appear anywhere in an index entry.
    * info/t/index-paren.sh: New test.
    * info/t/README: Edit.
---
 ChangeLog                       |  11 +++++++++++
 info/Makefile.am                |   1 +
 info/scan.c                     |   2 +-
 info/t/README                   |  13 ++++++++-----
 info/t/infodir/index-paren.info | Bin 0 -> 90 bytes
 5 files changed, 21 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 752a57443e..3c88749263 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2022-03-18  Gavin Smith  <gavinsmith0123@gmail.com>
+
+       Handle index entries beginning (
+
+       * info/scan.c (scan_reference_label): If label is in an index, do
+       not check for a bracketed filename.  This supports index entries
+       beginning with a '(' character.  This should allow practically
+       any character to appear anywhere in an index entry.
+       * info/t/index-paren.sh: New test.
+       * info/t/README: Edit.
+
 2022-03-16  Gavin Smith  <gavinsmith0123@gmail.com>
 
        Move functions between files
diff --git a/info/Makefile.am b/info/Makefile.am
index 1fd039ab1d..35596b10ad 100644
--- a/info/Makefile.am
+++ b/info/Makefile.am
@@ -143,6 +143,7 @@ TESTS = \
        t/index-completing.sh \
        t/split-index.sh \
        t/index-long-nodeline.sh \
+       t/index-paren.sh \
        t/empty-infopath.sh \
        t/menu-sequence.sh \
        t/relative-reference.sh \
diff --git a/info/scan.c b/info/scan.c
index 051a92ea4a..e14641b3a4 100644
--- a/info/scan.c
+++ b/info/scan.c
@@ -1124,7 +1124,7 @@ scan_reference_label (REFERENCE *entry, int in_index)
   int len, label_len = 0;
 
   /* Handle case of cross-reference like (FILE)NODE::. */
-  if (inptr[0] == '(')
+  if (inptr[0] == '(' && !in_index)
     label_len = read_bracketed_filename (inptr, &entry->filename);
 
   /* Search forward to ":" to get label name.  Cross-references may have
diff --git a/info/t/README b/info/t/README
index 3817ff4dc7..d8e1a7632d 100644
--- a/info/t/README
+++ b/info/t/README
@@ -3,8 +3,8 @@ listed in "info/Makefile.am" and will usually be run with "make 
check".
 It should be possible to run a test on its own by running it at the
 command line and checking the return value, e.g.
 
-bash $t/goto-quoted.sh
-bash $echo $?
+$ t/goto-quoted.sh
+$ echo $?
 1
 
 shows a test failure.
@@ -25,9 +25,12 @@ Any interactive test should also finish with
 
 cleanup
 
-to cleanup temporary files and spawned processes.  This function
-will exit with whatever the value of RETVAL is, so you can set the
-exit status of the script indicating success or failure.
+to cleanup temporary files and spawned processes.  'cleanup' will
+exit the script with a status of $retval, which the test should set
+to indicate success or failure.
+
+Non interactive tests can run 'info' as $ginfo.  The interactive tests
+use the run_ginfo function.
 
 Tests of interactive operation
 ------------------------------
diff --git a/info/t/infodir/index-paren.info b/info/t/infodir/index-paren.info
new file mode 100644
index 0000000000..fb46280656
Binary files /dev/null and b/info/t/infodir/index-paren.info differ



reply via email to

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