texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/texi2any.pl: Strip directories from filename


From: Gavin D. Smith
Subject: branch master updated: * tp/texi2any.pl: Strip directories from filename in warning for predicatable results in test suite.
Date: Sat, 03 Dec 2022 05:43:42 -0500

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 40798dd84e * tp/texi2any.pl: Strip directories from filename in 
warning for predicatable results in test suite.
40798dd84e is described below

commit 40798dd84eb29a25ac233a9d22e063848e2a55e8
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Sat Dec 3 10:43:29 2022 +0000

    * tp/texi2any.pl: Strip directories from filename in warning for
    predicatable results in test suite.
---
 ChangeLog                                                        | 5 +++++
 tp/tests/formatting/res_parser/info_extension_warning/foo.info.2 | 2 +-
 tp/texi2any.pl                                                   | 6 +++---
 3 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 988e7a1177..0517ad3aa3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2022-12-03  Gavin Smith  <gavinsmith0123@gmail.com>
+
+       * tp/texi2any.pl: Strip directories from filename in warning for
+       predicatable results in test suite.
+
 2022-12-03  Gavin Smith  <gavinsmith0123@gmail.com>
 
        * configure.ac (AM_INIT_AUTOMAKE): Remove dist-xz option for
diff --git a/tp/tests/formatting/res_parser/info_extension_warning/foo.info.2 
b/tp/tests/formatting/res_parser/info_extension_warning/foo.info.2
index 8c585cb5e4..aefd727f89 100644
--- a/tp/tests/formatting/res_parser/info_extension_warning/foo.info.2
+++ b/tp/tests/formatting/res_parser/info_extension_warning/foo.info.2
@@ -1,2 +1,2 @@
-texi2any: warning: input file `./formatting//foo.info'; did you mean 
`./formatting//foo.texi'?
+texi2any: warning: input file foo.info; did you mean foo.texi?
 could not open ./formatting//foo.info: No such file or directory
diff --git a/tp/texi2any.pl b/tp/texi2any.pl
index 40b9b630df..9c550790a0 100755
--- a/tp/texi2any.pl
+++ b/tp/texi2any.pl
@@ -1343,10 +1343,10 @@ while(@input_files) {
   my $input_file_arg = shift(@input_files);
   my $input_file_name;
   if ($input_file_arg =~ /\.info$/) {
+      my $basename = ($input_file_arg =~ s|.*/||r);
       document_warn(sprintf(
-          __('input file `%s\'; did you mean `%s\'?'),
-          $input_file_arg,
-          ($input_file_arg =~ s/\.info$/.texi/r)));
+          __('input file %s; did you mean %s?'),
+          $basename, ($basename =~ s/\.info$/.texi/r)));
   }
   # try to concatenate with different suffixes. The last suffix is ''
   # such that the plain file name is checked.



reply via email to

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