bug-gnulib
[Top][All Lists]
Advanced

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

update-copyright tests: Fix test failure


From: Bruno Haible
Subject: update-copyright tests: Fix test failure
Date: Tue, 03 Oct 2023 14:45:17 +0200

In a testdir of all of gnulib, on Mac OS X 10.5.8, I see this test failure:

FAIL: test-update-copyright.sh

This is the log file:

$ cat test-update-copyright.sh.log 
--- -   2023-10-03 10:28:56.000000000 +0200
+++ update-copyright.test-ex-stderr     2023-10-03 10:28:56.000000000 +0200
@@ -1,2 +1,6 @@
-update-copyright.test-ex-4: warning: copyright statement not found
-update-copyright.test-ex-5: warning: copyright statement not found
+Eval-group not allowed at runtime, use re 'eval' in regex m/
+                (\d{4})
+                (?:
+                  (,\ |(?:--?|\\\(en))
+                  ((??{
+         .../ at 
/Users/bruno/data/build/testdir-all/build-aux/update-copyright line 243, <> 
chunk 1.
FAIL test-update-copyright.sh (exit status: 1)

On this system, perl is v5.8.8.

Pádraig Brady reported the same test failure on CentOS 7, with perl v5.16.3,
at https://lists.gnu.org/archive/html/coreutils/2023-08/msg00055.html .
I observe the same test failure also in a gnulib testdir, created through
  ./gnulib-tool --create-testdir --dir=... --single-configure update-copyright

With the version of 'update-copyright.sh' before 2023-06-18, the test
succeeds on CentOS 7. Thus it must be a regression from 2023-06-18.

https://stackoverflow.com/questions/16320545/ explains the error and gives
a workaround.


2023-10-03  Bruno Haible  <bruno@clisp.org>

        update-copyright tests: Fix test failure (regression 2023-06-18).
        * build-aux/update-copyright: Add "use re 'eval';" declaration.

diff --git a/build-aux/update-copyright b/build-aux/update-copyright
index 0343eaa72c..509f86c1dc 100755
--- a/build-aux/update-copyright
+++ b/build-aux/update-copyright
@@ -138,7 +138,7 @@
 eval 'exec perl -wSx -0777 -pi "$0" "$@"'
      if 0;
 
-my $VERSION = '2023-06-18.01:14'; # UTC
+my $VERSION = '2023-10-03.12:14'; # UTC
 # The definition above must lie within the first 8 lines in order
 # for the Emacs time-stamp write hook (at end) to update it.
 # If you change this file with Emacs, please let the write hook
@@ -146,6 +146,7 @@ my $VERSION = '2023-06-18.01:14'; # UTC
 
 use strict;
 use warnings;
+use re 'eval';
 
 my $copyright_re = 'Copyright';
 my $circle_c_re = '(?:\([cC]\)|@copyright\{}|\\\\\(co|&copy;|©)';






reply via email to

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