From: Heiko Schlittermann (HS12) Date: Wed, 6 May 2015 21:16:59 +0000 (+0200) Subject: Testsuite: Fix the [U]pdate for new testcases X-Git-Tag: exim-4_86_RC1~47 X-Git-Url: https://git.exim.org/exim.git/commitdiff_plain/2f8e6f3087227b9d30bc71862ff9f1cc3355f52d Testsuite: Fix the [U]pdate for new testcases --- diff --git a/test/runtest b/test/runtest index f0a633d61..f215bf4de 100755 --- a/test/runtest +++ b/test/runtest @@ -20,6 +20,7 @@ use Socket; use Time::Local; use Cwd; use File::Basename; +use if $ENV{DEBUG} && $ENV{DEBUG} =~ /\bruntest\b/ => ('Smart::Comments' => '####'); # Start by initializing some global variables @@ -322,6 +323,8 @@ my($extra) = $_[1]; my($yield) = 0; my(@saved) = (); +local $_; + open(IN, "$file") || tests_exit(-1, "Failed to open $file: $!"); my($is_log) = $file =~ /log/; @@ -1069,7 +1072,7 @@ return $yield; # Arguments: [0] the prompt string # [1] if there is a U in the prompt and $force_update is true # [2] if there is a C in the prompt and $force_continue is true -# Returns: nothing (it sets $_) +# Returns: returns the answer sub interact{ print $_[0]; @@ -1178,6 +1181,8 @@ if (! -e $sf_current) } } +#### $_ + # Control reaches here if either (a) there is a saved file ($sf), or (b) there # was a request to create a saved file. First, create the munged file from any # data that does exist.