about summary refs log tree commit diff
path: root/t/8000-mflag.t
blob: 38ab639ef4fe9d384408322e7a88c89f449117d7 (plain) (blame)
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 -e
cd ${0%/*}
. ./lib.sh
plan 12

rm -rf test.dir
mkdir test.dir
(
cd test.dir

cat <<! >seq
inbox/cur/1:2,
inbox/cur/2:2,
!

mkdir -p inbox/cur
while read f; do touch "$f"; done <seq
ln -sf inbox/cur/1:2, cur

export MAILSEQ=seq MAILCUR=cur

check 'mark seen' 'mflag -S 1 && [ -e "inbox/cur/1:2,S" ]'
check 'fix seq' 'mseq -f | mseq -S | wc -l | grep -qx 2'
check 'mark replied' 'mflag -R 1 && [ -e "inbox/cur/1:2,RS" ]'
check 'fix seq' 'mseq -f | mseq -S | wc -l | grep -qx 2'
check 'unmark replied' 'mflag -r 1 && [ -e "inbox/cur/1:2,S" ]'
check 'fix seq' 'mseq -f | mseq -S | wc -l | grep -qx 2'
check 'mark flagged' 'mflag -F 1 && [ -e "inbox/cur/1:2,FS" ]'
check 'fix seq' 'mseq -f | mseq -S | wc -l | grep -qx 2'
check 'unmark flagged' 'mflag -f 1 && [ -e "inbox/cur/1:2,S" ]'
check 'fix seq' 'mseq -f | mseq -S | wc -l | grep -qx 2'
check 'unmark seen' 'mflag -s 1 && [ -e "inbox/cur/1:2," ]'
check 'fix seq' 'mseq -f | mseq -S | wc -l | grep -qx 2'

)