]>
diplodocus.org Git - nmh/blob - test/sequences/test-flist
2 ######################################################
6 ######################################################
10 if test -z "${MH_OBJ_DIR}"; then
11 srcdir
=`dirname $0`/..
/..
12 MH_OBJ_DIR
=`cd $srcdir && pwd`; export MH_OBJ_DIR
15 .
"$MH_OBJ_DIR/test/common.sh"
19 check_exit
'-eq 1' flist
- # gcov
21 run_test
'mark 1 3 5 7 9 +inbox -sequence odd' ''
22 run_test
'mark -s odd -list' 'odd: 1 3 5 7 9'
23 run_test
'mark +inbox -sequence unseen all' ''
24 run_test
'mark +inbox -sequence unseen -list' 'unseen: 1-10'
26 folder
-create +other
> /dev
/null
28 cp -p "$MH_TEST_DIR/Mail/inbox/1" "$MH_TEST_DIR/Mail/other/$i"
30 run_test
'mark +other -sequence unseen all' ''
31 run_test
'mark +other -sequence unseen -list' 'unseen: 2 5 7 12'
33 # Make sure that inbox is current folder.
34 folder
-f +inbox
> /dev
/null
37 run_test
'flists -seq odd' 'inbox+ has 5 in sequence odd; out of 10
38 other has 0 in sequence odd; out of 4'
40 run_test
'flists -seq unseen' \
41 'inbox+ has 10 in sequence unseen; out of 10
42 other has 4 in sequence unseen; out of 4'
44 # Test flist on individual folders, starting with the current folder.
45 run_test
'flist -sequence unseen' \
46 'inbox+ has 10 in sequence unseen; out of 10'
47 run_test
'flist +other -sequence unseen' \
48 'other+ has 4 in sequence unseen; out of 4'
50 # Test multiple folders and sequences.
51 run_test
'flist +inbox +other -seq unseen -seq odd' \
52 'inbox has 10 in sequence unseen; out of 10
53 inbox has 5 in sequence odd ; out of 10
54 other+ has 4 in sequence unseen; out of 4
55 other+ has 0 in sequence odd ; out of 4'
57 # Test Flist-Order with -noalpha.
58 echo 'Flist-Order: o* i*' >> "$MH"
59 run_test
'flists -seq unseen -seq odd -noalpha' \
60 'other+ has 4 in sequence unseen; out of 4
61 other+ has 0 in sequence odd ; out of 4
62 inbox has 10 in sequence unseen; out of 10
63 inbox has 5 in sequence odd ; out of 10'
65 # Test nonexistent folder.
66 run_test
'flist +nonexistent -seq unseen' ''
68 # Test nonexistent sequence.
69 run_test
'flist +inbox -seq nonexistent' \
70 'inbox+ has 0 in sequence nonexistent; out of 10'
73 folder
-f +inbox
> /dev
/null
74 run_test
'flist -sequence unseen -fast' 'inbox'
75 run_test
'flist +other -sequence unseen -fast' 'other'
77 # Test -fast and -alpha.
78 run_test
'flists -seq unseen -fast -alpha' 'inbox