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.
This commit is contained in:
Akim Demaille
2019-11-15 18:10:34 +01:00
parent 60ebd8e210
commit cd726fdc4d

View File

@@ -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])[