2017-03-30 23:23:05 +00:00
|
|
|
#!/bin/sh -e
|
|
|
|
cd ${0%/*}
|
|
|
|
. ./lib.sh
|
2017-06-24 22:11:06 +00:00
|
|
|
plan 16
|
2017-03-30 23:23:05 +00:00
|
|
|
|
|
|
|
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" ]'
|
2017-03-31 14:10:43 +00:00
|
|
|
check_test 'fix seq' -eq 2 'mseq -f | mseq -S | wc -l'
|
2017-03-30 23:23:05 +00:00
|
|
|
check 'mark replied' 'mflag -R 1 && [ -e "inbox/cur/1:2,RS" ]'
|
2017-03-31 14:10:43 +00:00
|
|
|
check_test 'fix seq' -eq 2 'mseq -f | mseq -S | wc -l'
|
2017-03-30 23:23:05 +00:00
|
|
|
check 'unmark replied' 'mflag -r 1 && [ -e "inbox/cur/1:2,S" ]'
|
2017-03-31 14:10:43 +00:00
|
|
|
check_test 'fix seq' -eq 2 'mseq -f | mseq -S | wc -l'
|
2017-03-30 23:23:05 +00:00
|
|
|
check 'mark flagged' 'mflag -F 1 && [ -e "inbox/cur/1:2,FS" ]'
|
2017-03-31 14:10:43 +00:00
|
|
|
check_test 'fix seq' -eq 2 'mseq -f | mseq -S | wc -l'
|
2017-03-30 23:23:05 +00:00
|
|
|
check 'unmark flagged' 'mflag -f 1 && [ -e "inbox/cur/1:2,S" ]'
|
2017-03-31 14:10:43 +00:00
|
|
|
check_test 'fix seq' -eq 2 'mseq -f | mseq -S | wc -l'
|
2017-03-30 23:23:05 +00:00
|
|
|
check 'unmark seen' 'mflag -s 1 && [ -e "inbox/cur/1:2," ]'
|
2017-03-31 14:10:43 +00:00
|
|
|
check_test 'fix seq' -eq 2 'mseq -f | mseq -S | wc -l'
|
2017-06-24 22:11:06 +00:00
|
|
|
check 'mark trashed' 'mflag -T 1 && [ -e "inbox/cur/1:2,T" ]'
|
|
|
|
check_test 'fix seq' -eq 2 'mseq -f | mseq -S | wc -l'
|
|
|
|
check 'unmark trashed' 'mflag -t 1 && [ -e "inbox/cur/1:2," ]'
|
|
|
|
check_test 'fix seq' -eq 2 'mseq -f | mseq -S | wc -l'
|
2017-03-30 23:23:05 +00:00
|
|
|
|
|
|
|
)
|