mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
tests: fix sed portability issues
Reported by Didier Godefroy, <http://lists.gnu.org/archive/html/bug-bison/2012-10/msg00005.html>. * tests/calc.at (AT_CHECK_SPACES): Use Perl.
This commit is contained in:
@@ -503,12 +503,15 @@ AT_CHECK([cat stderr], 0, [expout])
|
||||
# Make sure we did not introduce bad spaces. Checked here because all
|
||||
# the skeletons are (or should be) exercized here.
|
||||
m4_define([AT_CHECK_SPACES],
|
||||
[# No initial empty lines.
|
||||
AT_CHECK([sed -ne '/./q;=;p;' $1])
|
||||
# No trailing spaces.
|
||||
# FIXME: For 2.7: AT_CHECK([sed -ne '/[ ]$/{=;p;}' $1])
|
||||
# No final empty lines.
|
||||
AT_CHECK([sed -ne '${/^$/{=;p;};}' $1])
|
||||
[AT_CHECK([perl -ne '
|
||||
chomp;
|
||||
print "$.: {$_}\n"
|
||||
if (# No starting/ending empty lines.
|
||||
(eof || $. == 1) && /^\s*$/
|
||||
# No trailing space. FIXME: not ready for "maint".
|
||||
# || /\s$/
|
||||
)' $1
|
||||
])dnl
|
||||
])
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user