File: 19-copybody-already-ok

package info (click to toggle)
syncmaildir 1.2.5-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,104 kB
  • sloc: ansic: 6,643; sh: 1,780; makefile: 247
file content (24 lines) | stat: -rw-r--r-- 529 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash


msync 1

cp Mail/cur/`ls Mail/cur/ | head -n 1` Mail/cur/copied_here
sed -i 's/^Subject.*$/Subject: foo/' Mail/cur/copied_here
cp Mail/cur/copied_here target/Mail/cur/copied_here

msync 2

test_eq Mail target/Mail 

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

X=`grep '^GETHEADER ' log.c2s | wc -l`
assert $X 0 "GETHEADEr in c2s, should not"

X=`grep '^GET ' log.c2s | wc -l`
assert $X 0 "GET in c2s, should not"

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