X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=test%2Fruntest;h=137f8dac600c095a2c83299a4ae001827540a304;hb=03755744c9c07af50c92f44d287f1c4ea0db71be;hp=84cf4df4f618f063da2b76816ed5819a978e9c02;hpb=ae0a8c3a7e15ddec563e2eaef130d96bb3f7b2a8;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/test/runtest b/test/runtest index 84cf4df4f..137f8dac6 100755 --- a/test/runtest +++ b/test/runtest @@ -385,11 +385,21 @@ $spid = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; LINE: while() { RESET_AFTER_EXTRA_LINE_READ: + if ($munge_skip) + { + # Munging is a no-op. + # Useful when testing exim_msgdate so that + # we compare unmunged dates and message-ids. + print MUNGED; + next; + } + # Custom munges if ($extra) { next if $extra =~ m%^/% && eval $extra; eval $extra if $extra =~ m/^s/; + eval substr($extra, 1) if $extra =~ m/^R/; } # Check for "*** truncated ***" @@ -1917,7 +1927,8 @@ return 2; # Usable files are: # paniclog, rejectlog, mainlog, stdout, stderr, msglog, mail # Search strings starting with 's' do substitutions; -# with '/' do line-skips. +# with '/' do line-skips, +# with 'R' run given code. # Triggered by a scriptfile line "munge " ################################################## $munges = @@ -1964,7 +1975,13 @@ $munges = }, 'optional_dsn_info' => - { 'mail' => '/^(X-(Remote-MTA-(smtp-greeting|helo-response)|Exim-Diagnostic|(body|message)-linecount):|Remote-MTA: X-ip;)/' + { 'mail' => 'Rif (/^(X-(Remote-MTA-(smtp-greeting|helo-response)|Exim-Diagnostic|(body|message)-linecount):|Remote-MTA: X-ip;)/) { + while (1) { + $_ = ; + next if /^ /; + goto RESET_AFTER_EXTRA_LINE_READ; + } + }' }, 'optional_config' => @@ -2287,10 +2304,11 @@ my($yield) = 1; our %ENV = map { $_ => $ENV{$_} } grep { /^(?:USER|SHELL|PATH|TERM|EXIM_TEST_.*)$/ } keys %ENV; -if (/^(\d+)\s*$/) # Handle unusual return code +if (/^(\d+)\s*(?:([A-Z]+)=(\S+))?$/) # Handle unusual return code { my($r) = $_[2]; $$r = $1 << 8; + $ENV{$2} = $3 if (defined $2); $_ =