testing: ignore valid Akonadi vCard changes

Manipulating GEO and not storing X-EVOLUTION-UI-SLOT parameters
are acceptable changes, ignore them when testing.
This commit is contained in:
Patrick Ohly 2014-10-10 03:09:11 -07:00
parent 652c096cd3
commit 86ef9e515f
1 changed files with 10 additions and 0 deletions

View File

@ -98,6 +98,7 @@ my $radicale = $server =~ /radicale/;
my $zimbra = $server =~ /zimbra/;
my $evolution = $client =~ /evolution/;
my $addressbook = $client =~ /addressbook/;
my $akonadi = $server =~ /kde/;
sub Usage {
print "$0 <vcards.vcf\n";
@ -743,6 +744,15 @@ sub NormalizeItem {
s/^(GEO)(;[^:;\n]*)*:.*\r?\n?//gm;
}
if ($akonadi) {
# Akonadi adds empty GEO propery....
s/^(GEO)(;[^:;\n]*)*:0+\.0+;0+\.0+\r?\n?//gm;
# ... and rounds other values.
s/^(GEO(?:;[^:;\n]*)*):([-+]?\d+)\.\d+;([-+]?\d+)\.\d+/$1:$2;$3/gm;
# does not preserve X-EVOLUTION-UI-SLOT=
s/^(\w+)([^:\n]*);X-EVOLUTION-UI-SLOT=\d+/$1$2/mg;
}
if ($googleeas || $exchange) {
# temporarily ignore modified properties
s/^(BDAY|X-ANNIVERSARY)(;[^:;\n]*)*:.*\r?\n?//gm;