Fix negated dnslists item bug; add == and =& features, courtesy Brad
[exim.git] / test / patchexim
CommitLineData
151b83f8
PH
1#! /usr/bin/perl -w
2
3# $Cambridge: exim/test/patchexim,v 1.1 2006/02/06 16:07:10 ph10 Exp $
4
5###############################################################################
6# This is an auxiliary script that is part of the Exim test suite. It must be #
7# run as root, and is normally called from the main controlling script. Its #
8# job is to make a copy of Exim, suitably patched so that it can run in the #
9# test harness. See further comments in the main script. #
10# #
11# The only argument to this script is the name of the Exim binary that is to #
12# be copied. The script must be run in the correct current directory. #
13###############################################################################
14
15open(IN, "$ARGV[0]") || die "** Failed to open $ARGV[0]: $!\n";
16open(OUT, ">eximdir/exim") || die "** Failed to open eximdir/exim: $!\n";
17
18while(<IN>)
19 {
20 s/>>>running<<</<<<testing>>>/;
21 s/(\d+\.\d+(?:\.\d+)?(-RC\d+)?\0<<eximversion>>)/"x.yz\0" . ("*" x (length($1) - 5))/e;
22 print OUT;
23 }
24
25close(IN);
26close(OUT);
27
28chmod 04755, "eximdir/exim";
29
30# End of patchexim script