Browse Source

test for journalling and journal replay.

wip/maildir-uid-dupes-test
Oswald Buddenhagen 19 years ago
parent
commit
635b2d7b76
  1. 25
      src/run-tests.pl

25
src/run-tests.pl

@ -259,10 +259,33 @@ Slave :slave:
SyncState * SyncState *
".shift(); ".shift();
close FILE; close FILE;
open FILE, "../mbsync -D -c .mbsyncrc test 2>&1 |"; open FILE, "../mbsync -D -J -c .mbsyncrc test 2>&1 |";
my @out = <FILE>; my @out = <FILE>;
close FILE; close FILE;
open(FILE, "<", "slave/.mbsyncstate") or
die "Cannot read old sync state.\n";
my @oss = <FILE>;
close FILE;
open(FILE, "<", "slave/.mbsyncstate.journal") or
die "Cannot read journal.\n";
my @nj = <FILE>;
close FILE;
open(FILE, "<", "slave/.mbsyncstate.new") or
die "Cannot read new sync state.\n";
my @nss = <FILE>;
close FILE;
open FILE, "../mbsync -D -c .mbsyncrc --noop test 2>&1 |";
my @jout = <FILE>;
close FILE;
open(FILE, "<", "slave/.mbsyncstate") or
die "Cannot read sync state.\n";
my @jss = <FILE>;
close FILE;
unlink ".mbsyncrc"; unlink ".mbsyncrc";
if ("@nss" ne "@jss") {
print "Journalling error.\nOld State:\n".join("", @oss)."\nJournal:\n".join("", @nj)."\nNew State:\n".join("", @jss)."\nExpected New State:\n".join("", @nss)."\n";
exit 1;
}
return @out; return @out;
} }

Loading…
Cancel
Save