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:
Akim Demaille
2012-10-05 09:24:59 +02:00
parent 82443642d2
commit c955769a75
8 changed files with 25 additions and 23 deletions

View File

@@ -63,24 +63,26 @@ fi
## Other. ## ## 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 # Empty if no javac was found
CONF_JAVAC='@CONF_JAVAC@' CONF_JAVAC='@CONF_JAVAC@'
# Empty if no Java VM was found # Empty if no Java VM was found
CONF_JAVA='@CONF_JAVA@' CONF_JAVA='@CONF_JAVA@'
# Empty if no xsltproc was found
: ${XSLTPROC='@XSLTPROC@'}
# We need egrep. # We need egrep.
: ${EGREP='@EGREP@'} : ${EGREP='@EGREP@'}
# Use simple quotes (lib/quote.c). # Use simple quotes (lib/quote.c).
LC_CTYPE=C LC_CTYPE=C
export LC_CTYPE 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@'}

View File

@@ -503,7 +503,7 @@ 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],
[AT_CHECK([perl -ne ' [AT_CHECK([$PERL -ne '
chomp; chomp;
print "$.: {$_}\n" print "$.: {$_}\n"
if (# No starting/ending empty lines. if (# No starting/ending empty lines.

View File

@@ -1194,7 +1194,7 @@ AT_DATA([empty.y],
start: ''; start: '';
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], [], AT_BISON_CHECK([empty.y], [1], [],
[[empty.y:2.8-9: warning: empty character literal [[empty.y:2.8-9: warning: empty character literal
@@ -1209,7 +1209,7 @@ AT_DATA([two.y],
start: 'ab'; start: 'ab';
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], [], AT_BISON_CHECK([two.y], [1], [],
[[two.y:2.8-11: warning: extra characters in character literal [[two.y:2.8-11: warning: extra characters in character literal
@@ -1224,7 +1224,7 @@ AT_DATA([three.y],
start: 'abc'; start: 'abc';
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], [], AT_BISON_CHECK([three.y], [1], [],
[[three.y:2.8-12: warning: extra characters in character literal [[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 # Beside we cannot even expect "echo '\0'" to output two characters
# (well three with \n): at least Bash 3.2 converts the two-character # (well three with \n): at least Bash 3.2 converts the two-character
# sequence "\0" into a single NUL 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]]) || exit 77]])
AT_BISON_CHECK([input.y], [1], [], AT_BISON_CHECK([input.y], [1], [],

View File

@@ -38,7 +38,7 @@ m4_define([m4_null_if],
# Expect COUNT matches of the PERL-REGEXP in FILE. The file is # Expect COUNT matches of the PERL-REGEXP in FILE. The file is
# taken in "slurp" mode, i.e., one can match end-of-lines. # taken in "slurp" mode, i.e., one can match end-of-lines.
m4_define([AT_MATCHES_CHECK], m4_define([AT_MATCHES_CHECK],
[AT_CHECK([perl -0777 -ne ' [AT_CHECK([$PERL -0777 -ne '
my $count = 0; my $count = 0;
s{$2}{ ++$count; "" }gem; s{$2}{ ++$count; "" }gem;
printf "$count\n";' $1], [0], [$3 printf "$count\n";' $1], [0], [$3

View File

@@ -1481,17 +1481,17 @@ AT_CHECK([[grep 'syntax error,' stderr.txt]], [[0]],
# Check number of default reductions in inconsistent states to be sure # Check number of default reductions in inconsistent states to be sure
# syntax error is detected before unnecessary reductions are performed. # 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]]) < stdout.txt || exit 77]], [[0]], [[14]])
# Check number of default reductions in consistent states to be sure # Check number of default reductions in consistent states to be sure
# it is performed before the syntax error is detected. # 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]]) < stdout.txt || exit 77]], [[0]], [[2]])
# Check number of reallocs to be sure reallocated memory isn't somehow # Check number of reallocs to be sure reallocated memory isn't somehow
# lost between LAC invocations. # 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]]) || exit 77]], [[0]], [[3]])
AT_BISON_OPTION_POPDEFS AT_BISON_OPTION_POPDEFS

View File

@@ -315,7 +315,7 @@ print '@output(@,@)', "\n";
(print "garbage"x10, "\n") for (1..1000); (print "garbage"x10, "\n") for (1..1000);
print "${M4}_divert_pop(0)\n"; 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]], AT_DATA([[input.y]],
[[%skeleton "./skel.c" [[%skeleton "./skel.c"

View File

@@ -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] (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 # 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/^distcc\[\d+\] .*\n//gm;
s/^([^:]+:\d+)[.:][^:]+:(.+)$/$][1:$][2/gm; s/^([^:]+:\d+)[.:][^:]+:(.+)$/$][1:$][2/gm;
s/^([^:]+:\d+):[^#]*( #error)/$][1:$][2/gm; s/^([^:]+:\d+):[^#]*( #error)/$][1:$][2/gm;

View File

@@ -125,7 +125,7 @@ EOF
]]) ]])
AT_BISON_OPTION_POPDEFS 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 mv stdout $1
]) ])
@@ -214,7 +214,7 @@ main (void)
EOF 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 mv stdout $1
AT_BISON_OPTION_POPDEFS AT_BISON_OPTION_POPDEFS
]) ])
@@ -350,7 +350,7 @@ main (void)
EOF 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 mv stdout $1
AT_BISON_OPTION_POPDEFS AT_BISON_OPTION_POPDEFS
]) ])