#!/bin/bash

cd $ROOT/test.$N

msync 1

rm Mail/cur/`ls Mail/cur/ | head -n 1`
cp -r target/Mail/ target/Mail.old
chmod a-w target/Mail/cur

msync 2

chmod u+w target/Mail/cur

test_eq target/Mail.old target/Mail 

X=`grep '^DELETE ' log.s2c | wc -l`
assert $X 1 "missing DELETE in s2c"

X=`grep '^ABORT$' log.c2s | wc -l`
assert $X 1 "missing COMMIT in c2s"

