File: 16-check-conf

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 (35 lines) | stat: -rw-r--r-- 1,367 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/sh

mpull -t
assert $? 0 "failed mpull -t"

sed -i 's/MAILBOX=.*//' target/.smd/config.default
echo MAILBOX_LOCAL=MyMail >> target/.smd/config.default
echo MAILBOX_REMOTE=Mail >> target/.smd/config.default
echo 'TRANSLATOR_RL="smd-translate -m oimap-dovecot -d RL default"'>> target/.smd/config.default
echo 'TRANSLATOR_LR="smd-translate -m oimap-dovecot -d LR default"' >> target/.smd/config.default

mkdir -p Mail/.foo.bar
cp -r Mail/cur Mail/.foo.bar/

mcheck
W=`grep 'Error while listing the content of MyMail' log.check | wc -l`
assert $W 1 "listing the content of a non existing dir"
W=`grep 'Mail/cur -> MyMail/cur -> Mail/cur' log.check | wc -l`
assert $W 1 "Not translating Mail/cur"
W=`grep 'Mail/.foo.bar/cur -> MyMail/foo.bar/cur -> Mail/.foo.bar/cur' log.check | wc -l`
assert $W 1 "Not translating Mail/.foo.bar/cur"


mpull
assert $? 0 "mpull failed"

mcheck
W=`grep 'MyMail/foo.bar/cur -> Mail/.foo.bar/cur -> MyMail/foo.bar/cur' log.check| wc -l`
assert $W 1 "Not translating MyMail/foo.bar/cur"
W=`grep 'MyMail/cur -> Mail/cur -> MyMail/cur' log.check| wc -l`
assert $W 1 "Not translating MyMail/cur"
W=`grep 'Mail/cur -> MyMail/cur -> Mail/cur' log.check | wc -l`
assert $W 1 "Not translating Mail/cur"
W=`grep 'Mail/.foo.bar/cur -> MyMail/foo.bar/cur -> Mail/.foo.bar/cur' log.check | wc -l`
assert $W 1 "Not translating Mail/.foo.bar/cur"