* 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.
## 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@'}
# 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.
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
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
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
# 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], [],
# 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
# 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
(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"
# 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;
]])
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
])
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
])
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
])