mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 04:13:03 +00:00
tests: use $PERL instead of perl
* tests/atlocal.in (PERL): New. Sort. * tests/calc.at, tests/input.at, tests/local.at, tests/regression.at, * tests/skeletons.at, tests/synclines.at, tests/torture.at: here.
This commit is contained in:
@@ -63,24 +63,26 @@ fi
|
||||
## Other. ##
|
||||
## ------- ##
|
||||
|
||||
# Are special link options needed?
|
||||
LDFLAGS='@LDFLAGS@'
|
||||
|
||||
# Are special libraries needed?
|
||||
LIBS="$abs_top_builddir/lib/libbison.a @LIBS@ @INTLLIBS@"
|
||||
|
||||
# Empty if no javac was found
|
||||
CONF_JAVAC='@CONF_JAVAC@'
|
||||
|
||||
# Empty if no Java VM was found
|
||||
CONF_JAVA='@CONF_JAVA@'
|
||||
|
||||
# Empty if no xsltproc was found
|
||||
: ${XSLTPROC='@XSLTPROC@'}
|
||||
|
||||
# We need egrep.
|
||||
: ${EGREP='@EGREP@'}
|
||||
|
||||
# Use simple quotes (lib/quote.c).
|
||||
LC_CTYPE=C
|
||||
export LC_CTYPE
|
||||
|
||||
# Are special link options needed?
|
||||
LDFLAGS='@LDFLAGS@'
|
||||
|
||||
# Are special libraries needed?
|
||||
LIBS="$abs_top_builddir/lib/libbison.a @LIBS@ @INTLLIBS@"
|
||||
|
||||
# Empty if no xsltproc was found
|
||||
: ${XSLTPROC='@XSLTPROC@'}
|
||||
|
||||
: ${PERL='@PERL@'}
|
||||
|
||||
@@ -503,7 +503,7 @@ 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],
|
||||
[AT_CHECK([perl -ne '
|
||||
[AT_CHECK([$PERL -ne '
|
||||
chomp;
|
||||
print "$.: {$_}\n"
|
||||
if (# No starting/ending empty lines.
|
||||
|
||||
@@ -1194,7 +1194,7 @@ AT_DATA([empty.y],
|
||||
start: '';
|
||||
start: '
|
||||
]])
|
||||
AT_CHECK([[perl -e "print 'start: \'';" >> empty.y || exit 77]])
|
||||
AT_CHECK([[$PERL -e "print 'start: \'';" >> empty.y || exit 77]])
|
||||
|
||||
AT_BISON_CHECK([empty.y], [1], [],
|
||||
[[empty.y:2.8-9: warning: empty character literal
|
||||
@@ -1209,7 +1209,7 @@ AT_DATA([two.y],
|
||||
start: 'ab';
|
||||
start: 'ab
|
||||
]])
|
||||
AT_CHECK([[perl -e "print 'start: \'ab';" >> two.y || exit 77]])
|
||||
AT_CHECK([[$PERL -e "print 'start: \'ab';" >> two.y || exit 77]])
|
||||
|
||||
AT_BISON_CHECK([two.y], [1], [],
|
||||
[[two.y:2.8-11: warning: extra characters in character literal
|
||||
@@ -1224,7 +1224,7 @@ AT_DATA([three.y],
|
||||
start: 'abc';
|
||||
start: 'abc
|
||||
]])
|
||||
AT_CHECK([[perl -e "print 'start: \'abc';" >> three.y || exit 77]])
|
||||
AT_CHECK([[$PERL -e "print 'start: \'abc';" >> three.y || exit 77]])
|
||||
|
||||
AT_BISON_CHECK([three.y], [1], [],
|
||||
[[three.y:2.8-12: warning: extra characters in character literal
|
||||
@@ -1253,7 +1253,7 @@ start: '\777' '\0' '\xfff' '\x0'
|
||||
# Beside we cannot even expect "echo '\0'" to output two characters
|
||||
# (well three with \n): at least Bash 3.2 converts the two-character
|
||||
# sequence "\0" into a single NUL character.
|
||||
AT_CHECK([[perl -e 'print "start: \"\\\t\\\f\\\0\\\1\" ;";' >> input.y \
|
||||
AT_CHECK([[$PERL -e 'print "start: \"\\\t\\\f\\\0\\\1\" ;";' >> input.y \
|
||||
|| exit 77]])
|
||||
|
||||
AT_BISON_CHECK([input.y], [1], [],
|
||||
|
||||
@@ -38,7 +38,7 @@ m4_define([m4_null_if],
|
||||
# Expect COUNT matches of the PERL-REGEXP in FILE. The file is
|
||||
# taken in "slurp" mode, i.e., one can match end-of-lines.
|
||||
m4_define([AT_MATCHES_CHECK],
|
||||
[AT_CHECK([perl -0777 -ne '
|
||||
[AT_CHECK([$PERL -0777 -ne '
|
||||
my $count = 0;
|
||||
s{$2}{ ++$count; "" }gem;
|
||||
printf "$count\n";' $1], [0], [$3
|
||||
|
||||
@@ -1481,17 +1481,17 @@ AT_CHECK([[grep 'syntax error,' stderr.txt]], [[0]],
|
||||
|
||||
# Check number of default reductions in inconsistent states to be sure
|
||||
# syntax error is detected before unnecessary reductions are performed.
|
||||
AT_CHECK([[perl -0777 -ne 'print s/inconsistent default reduction//g;' \
|
||||
AT_CHECK([[$PERL -0777 -ne 'print s/inconsistent default reduction//g;' \
|
||||
< stdout.txt || exit 77]], [[0]], [[14]])
|
||||
|
||||
# Check number of default reductions in consistent states to be sure
|
||||
# it is performed before the syntax error is detected.
|
||||
AT_CHECK([[perl -0777 -ne 'print s/\bconsistent default reduction//g;' \
|
||||
AT_CHECK([[$PERL -0777 -ne 'print s/\bconsistent default reduction//g;' \
|
||||
< stdout.txt || exit 77]], [[0]], [[2]])
|
||||
|
||||
# Check number of reallocs to be sure reallocated memory isn't somehow
|
||||
# lost between LAC invocations.
|
||||
AT_CHECK([[perl -0777 -ne 'print s/\(realloc//g;' < stderr.txt \
|
||||
AT_CHECK([[$PERL -0777 -ne 'print s/\(realloc//g;' < stderr.txt \
|
||||
|| exit 77]], [[0]], [[3]])
|
||||
|
||||
AT_BISON_OPTION_POPDEFS
|
||||
|
||||
@@ -315,7 +315,7 @@ print '@output(@,@)', "\n";
|
||||
(print "garbage"x10, "\n") for (1..1000);
|
||||
print "${M4}_divert_pop(0)\n";
|
||||
]])
|
||||
AT_CHECK([[perl gen-skel.pl > skel.c || exit 77]])
|
||||
AT_CHECK([[$PERL gen-skel.pl > skel.c || exit 77]])
|
||||
|
||||
AT_DATA([[input.y]],
|
||||
[[%skeleton "./skel.c"
|
||||
|
||||
@@ -64,7 +64,7 @@ m4_define([AT_SYNCLINES_COMPILE],
|
||||
# distcc[35882] (dcc_connect_by_name) ERROR: failed to look up host "chrisimac": Unknown host
|
||||
# distcc[35882] Warning: failed to distribute input.c to chrisimac/4, running locally instead
|
||||
|
||||
AT_CHECK([[perl -p -0777 - stderr <<\EOF
|
||||
AT_CHECK([[$PERL -p -0777 - stderr <<\EOF
|
||||
s/^distcc\[\d+\] .*\n//gm;
|
||||
s/^([^:]+:\d+)[.:][^:]+:(.+)$/$][1:$][2/gm;
|
||||
s/^([^:]+:\d+):[^#]*( #error)/$][1:$][2/gm;
|
||||
|
||||
@@ -125,7 +125,7 @@ EOF
|
||||
]])
|
||||
AT_BISON_OPTION_POPDEFS
|
||||
|
||||
AT_CHECK([perl -w ./gengram.pl $2 || exit 77], 0, [stdout])
|
||||
AT_CHECK([$PERL -w ./gengram.pl $2 || exit 77], 0, [stdout])
|
||||
mv stdout $1
|
||||
])
|
||||
|
||||
@@ -214,7 +214,7 @@ main (void)
|
||||
EOF
|
||||
]])
|
||||
|
||||
AT_CHECK([perl -w ./gengram.pl $2 || exit 77], 0, [stdout])
|
||||
AT_CHECK([$PERL -w ./gengram.pl $2 || exit 77], 0, [stdout])
|
||||
mv stdout $1
|
||||
AT_BISON_OPTION_POPDEFS
|
||||
])
|
||||
@@ -350,7 +350,7 @@ main (void)
|
||||
EOF
|
||||
]])
|
||||
|
||||
AT_CHECK([perl -w ./gengram.pl $2 || exit 77], 0, [stdout])
|
||||
AT_CHECK([$PERL -w ./gengram.pl $2 || exit 77], 0, [stdout])
|
||||
mv stdout $1
|
||||
AT_BISON_OPTION_POPDEFS
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user