From 3a6d967872cd3b9e4300257fa9ec67760b91227c Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Wed, 23 Sep 2020 11:01:05 +0200 Subject: [PATCH] tests: replace non-portable use of sed by $PERL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes one failure reported in #428 by Étienne Renault. * tests/core/lbt.test: Here. * tests/run.in: Export PERL. --- tests/core/lbt.test | 4 ++-- tests/run.in | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/core/lbt.test b/tests/core/lbt.test index 7602e1945..73ecaa54c 100755 --- a/tests/core/lbt.test +++ b/tests/core/lbt.test @@ -1,6 +1,6 @@ #!/bin/sh # -*- coding: utf-8 -*- -# Copyright (C) 2013, 2016, 2017, 2019 Laboratoire de Recherche et +# Copyright (C) 2013, 2016, 2017, 2019, 2020 Laboratoire de Recherche et # Développement de l'Epita (LRDE). # # This file is part of Spot, a model checking library. @@ -99,7 +99,7 @@ test `wc -l < formulas.4` -eq 168 # Add some carriage returns to simulate MS-DOS files and # make sure our parser does not mind. -sed 's/$/\r/' formulas.2 > formulas.2ms +$PERL -pe 's/$/\r/' formulas.2 > formulas.2ms # The --csv-escape option is now obsolete and replaced by double # quotes in the format string. So eventually the first two lines # should disappear. diff --git a/tests/run.in b/tests/run.in index 77d898e72..7a2fe2a70 100755 --- a/tests/run.in +++ b/tests/run.in @@ -61,6 +61,9 @@ export top_builddir top_srcdir='@abs_top_srcdir@' export top_srcdir +PERL='@PERL@' +export PERL + # Reset those variables, as they may affect the output of DOT. SPOT_DOTEXTRA= export SPOT_DOTEXTRA @@ -108,7 +111,7 @@ case $1 in *.test) exec sh -x "$@";; *.pl) - exec @PERL@ "$@";; + exec $PERL "$@";; *python*|*jupyter*) PYTHONPATH=$pypath DYLD_LIBRARY_PATH=$modpath \ exec $PREFIXCMD "$@";;