Re: 'make check' fails due to old perl on cygwin

Akim Demaille <[email protected]>
Newsgroups gmane.comp.parsers.bison.bugs
Message-ID <[email protected]>
Hi Denis,

Thanks for the report.  Does this address the problem?

commit 97f7448883bb6ef47d777b0f89e981998e76dcf2
Author: Akim Demaille <[email protected]>
Date:   Fri Nov 15 18:10:34 2019 +0100

    tests: be robust to old Perl versions on Cygwin
    
    Reported by Denis Excoffier.
    https://lists.gnu.org/archive/html/bug-bison/2019-11/msg00008.html.
    
    * tests/output.at: Be sure to remove back up files.

diff --git a/tests/output.at b/tests/output.at
index 54214eaa..c9451498 100644
--- a/tests/output.at
+++ b/tests/output.at
@@ -47,8 +47,12 @@ done
 foo: '0' {};
 ]])
 
-# There is not AT_DATA_UNQUOTED.
-AT_PERL_REQUIRE([-pi -e 's{\$at_dir}'"{$at_group_dir}g" $1])
+# There is no AT_DATA_UNQUOTED.
+if $EGREP 'at_dir' $1 >/dev/null; then
+   AT_PERL_REQUIRE([-pi -e 's{\$at_dir}'"{$at_group_dir}g" $1])
+   # On Cygwin, up to Perl 5.28, 'perl -pi' left a foo.bak file.
+   AT_CHECK([rm -f $1.bak])
+fi
 
 
 AT_BISON_CHECK([$3 $1], [$5], [], [ignore])[
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.