CVS commit by ossi: 

test for journalling and journal replay.


  M +24 -1     run-tests.pl   1.14


--- isync/src/run-tests.pl  #1.13:1.14
@@ -260,8 +260,31 @@
 ".shift();
        close FILE;
-       open FILE, "../mbsync -D -c .mbsyncrc test 2>&1 |";
+       open FILE, "../mbsync -D -J -c .mbsyncrc test 2>&1 |";
        my @out = <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";
+       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;
 }




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
isync-devel mailing list
isync-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/isync-devel

Reply via email to