diff options
Diffstat (limited to 'tests/diagnostics.at')
-rw-r--r-- | tests/diagnostics.at | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/diagnostics.at b/tests/diagnostics.at index a1754ab3..96d7e224 100644 --- a/tests/diagnostics.at +++ b/tests/diagnostics.at @@ -39,14 +39,16 @@ AT_DATA_GRAMMAR([[input.y]], [$2]) # For some reason, literal ^M in the input are removed and don't end # in `input.y`. So use the two-character ^M represent it, and let # Perl insert real CR characters. -AT_CHECK([$PERL -pi -e 's{\^M}{\r}gx' input.y || exit 77]) +if grep '\^M' input.y >/dev/null; then + AT_PERL_REQUIRE([-pi -e 's{\^M}{\r}gx' input.y]) +fi AT_DATA([experr], [$4]) AT_CHECK([LC_ALL=en_US.UTF-8 $5 bison -fcaret --color=debug -Wall input.y], [$3], [], [experr]) # When no style, same messages, but without style. -AT_CHECK(["$PERL" -pi -e 's{(</?(-|\w)+>)}{ $[]1 eq "<tag>" ? $[]1 : "" }ge' experr || exit 77]) +AT_PERL_REQUIRE([-pi -e 's{(</?(-|\w)+>)}{ $[]1 eq "<tag>" ? $[]1 : "" }ge' experr]) # Cannot use AT_BISON_CHECK easily as we need to change the # environment. |