]>
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
-
20 check_exit
'-eq 1' flist
-xyzzy
21 check_exit
'-eq 0' flist
-help
22 check_exit
'-eq 0' flist
-version
23 check_exit
'-eq 1' flist
-sequence
24 check_exit
'-eq 1' flist
-all -noall -showzero -noshowzero \
25 -recurse -norecurse -total -
29 check_exit
'-eq 1' flist
`echo $c | sed 's/./& /g'` 101 -
31 run_test
'mark 1 3 5 7 9 +inbox -sequence odd' ''
32 run_test
'mark -s odd -list' 'odd: 1 3 5 7 9'
33 run_test
'mark +inbox -sequence unseen all' ''
34 run_test
'mark +inbox -sequence unseen -list' 'unseen: 1-10'
36 folder
-create +other
> /dev
/null
38 cp -p "$MH_TEST_DIR/Mail/inbox/1" "$MH_TEST_DIR/Mail/other/$i"
40 run_test
'mark +other -sequence unseen all' ''
41 run_test
'mark +other -sequence unseen -list' 'unseen: 2 5 7 12'
43 # Make sure that inbox is current folder.
44 folder
-f +inbox
> /dev
/null
47 run_test
'flists -seq odd' 'inbox+ has 5 in sequence odd; out of 10
48 other has 0 in sequence odd; out of 4'
50 run_test
'flists -seq unseen' \
51 'inbox+ has 10 in sequence unseen; out of 10
52 other has 4 in sequence unseen; out of 4'
54 # Test flist on individual folders, starting with the current folder.
55 run_test
'flist -sequence unseen' \
56 'inbox+ has 10 in sequence unseen; out of 10'
57 run_test
'flist +other -sequence unseen' \
58 'other+ has 4 in sequence unseen; out of 4'
60 # Test multiple folders and sequences.
61 run_test
'flist +inbox +other -seq unseen -seq odd' \
62 'inbox has 10 in sequence unseen; out of 10
63 inbox has 5 in sequence odd ; out of 10
64 other+ has 4 in sequence unseen; out of 4
65 other+ has 0 in sequence odd ; out of 4'
67 # Test Flist-Order with -noalpha.
68 echo 'Flist-Order: o* i*' >> "$MH"
69 run_test
'flists -seq unseen -seq odd -noalpha' \
70 'other+ has 4 in sequence unseen; out of 4
71 other+ has 0 in sequence odd ; out of 4
72 inbox has 10 in sequence unseen; out of 10
73 inbox has 5 in sequence odd ; out of 10'
75 # Test nonexistent folder.
76 run_test
'flist +nonexistent -seq unseen' ''
78 # Test nonexistent sequence.
79 run_test
'flist +inbox -seq nonexistent' \
80 'inbox+ has 0 in sequence nonexistent; out of 10'
83 folder
-f +inbox
> /dev
/null
84 run_test
'flist -sequence unseen -fast' 'inbox'
85 run_test
'flist +other -sequence unseen -fast' 'other'
87 # Test -fast and -alpha.
88 run_test
'flists -seq unseen -fast -alpha' 'inbox