mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-18 16:53:02 +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
|
# Make sure we did not introduce bad spaces. Checked here because all
|
||||||
# the skeletons are (or should be) exercized here.
|
# the skeletons are (or should be) exercized here.
|
||||||
m4_define([AT_CHECK_SPACES],
|
m4_define([AT_CHECK_SPACES],
|
||||||
[# No initial empty lines.
|
[AT_CHECK([perl -ne '
|
||||||
AT_CHECK([sed -ne '/./q;=;p;' $1])
|
chomp;
|
||||||
# No trailing spaces.
|
print "$.: {$_}\n"
|
||||||
# FIXME: For 2.7: AT_CHECK([sed -ne '/[ ]$/{=;p;}' $1])
|
if (# No starting/ending empty lines.
|
||||||
# No final empty lines.
|
(eof || $. == 1) && /^\s*$/
|
||||||
AT_CHECK([sed -ne '${/^$/{=;p;};}' $1])
|
# No trailing space. FIXME: not ready for "maint".
|
||||||
|
# || /\s$/
|
||||||
|
)' $1
|
||||||
|
])dnl
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user