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 run_test 'mark 1 3 5 7 9 +inbox -sequence odd' ''
20 run_test 'mark -s odd -list' 'odd: 1 3 5 7 9'
21 run_test 'mark +inbox -sequence unseen all' ''
22 run_test 'mark +inbox -sequence unseen -list' 'unseen: 1-10'
24 folder -create +other > /dev/null
26 cp -p "$MH_TEST_DIR/Mail/inbox/1" "$MH_TEST_DIR/Mail/other/$i"
28 run_test 'mark +other -sequence unseen all' ''
29 run_test 'mark +other -sequence unseen -list' 'unseen: 2 5 7 12'
31 # Make sure that inbox is current folder.
32 folder -f +inbox > /dev/null
35 run_test 'flists -seq odd' 'inbox+ has 5 in sequence odd; out of 10
36 other has 0 in sequence odd; out of 4'
38 run_test 'flists -seq unseen' \
39 'inbox+ has 10 in sequence unseen; out of 10
40 other has 4 in sequence unseen; out of 4'
42 # Test flist on individual folders, starting with the current folder.
43 run_test 'flist -sequence unseen' \
44 'inbox+ has 10 in sequence unseen; out of 10'
45 run_test 'flist +other -sequence unseen' \
46 'other+ has 4 in sequence unseen; out of 4'
48 # Test multiple folders and sequences.
49 run_test 'flist +inbox +other -seq unseen -seq odd' \
50 'inbox has 10 in sequence unseen; out of 10
51 inbox has 5 in sequence odd ; out of 10
52 other+ has 4 in sequence unseen; out of 4
53 other+ has 0 in sequence odd ; out of 4'
55 # Test Flist-Order with -noalpha.
56 echo 'Flist-Order: o* i*' >> $MH_TEST_DIR/Mail/.mh_profile
57 run_test 'flists -seq unseen -seq odd -noalpha' \
58 'other+ has 4 in sequence unseen; out of 4
59 other+ has 0 in sequence odd ; out of 4
60 inbox has 10 in sequence unseen; out of 10
61 inbox has 5 in sequence odd ; out of 10'
63 # Test nonexistent folder.
64 run_test 'flist +nonexistent -seq unseen' ''
66 # Test nonexistent sequence.
67 run_test 'flist +inbox -seq nonexistent' \
68 'inbox+ has 0 in sequence nonexistent; out of 10'
71 folder -f +inbox > /dev/null
72 run_test 'flist -sequence unseen -fast' 'inbox'
73 run_test 'flist +other -sequence unseen -fast' 'other'
75 # Test -fast and -alpha.
76 run_test 'flists -seq unseen -fast -alpha' 'inbox