3 # TODO: Move to a common file tests can source; need more framework...
6 diff -u $expected $actual
12 folders=$MH_TEST_DIR/Mail/.folders
14 expected=$MH_TEST_DIR/$$.expected
15 actual=$MH_TEST_DIR/$$.actual
18 cp -r $MH_TEST_DIR/Mail/inbox $MH_TEST_DIR/Mail/foo1
19 cp -r $MH_TEST_DIR/Mail/inbox $MH_TEST_DIR/Mail/foo2
20 # but only list inbox and foo2 in .folders, and sorted differently
26 # test with no desired messages
30 new aseq > $actual 2>&1
32 new -folders $folders aseq > $actual 2>&1
35 # test fnext/fprev with no desired messages
36 cat /dev/null > $expected
37 fnext aseq > $actual 2>&1
39 fprev aseq > $actual 2>&1
42 # add 1 desired message in each folder
43 echo 'aseq: 1' > $MH_TEST_DIR/Mail/inbox/.mh_sequences
44 echo 'aseq: 1' > $MH_TEST_DIR/Mail/foo1/.mh_sequences
45 echo 'aseq: 1' > $MH_TEST_DIR/Mail/foo2/.mh_sequences
47 # test with all folders
54 new aseq > $actual 2>&1
63 new -folders $folders aseq > $actual 2>&1
66 # add 2 desired messages to another sequence in each folder
67 echo 'bseq: 3-4' >> $MH_TEST_DIR/Mail/inbox/.mh_sequences
68 echo 'bseq: 3-4' >> $MH_TEST_DIR/Mail/foo1/.mh_sequences
69 echo 'bseq: 3-4' >> $MH_TEST_DIR/Mail/foo2/.mh_sequences
71 # test listing aseq and bseq
78 new aseq bseq > $actual 2>&1
81 # set aseq bseq as unseen
82 echo 'Unseen-Sequence: aseq bseq' >>"$MMH/profile"
89 3 aseq bseq messages in foo1
90 1 2006-09-29 00:00 Test1 Testing message 1
91 3 2006-09-29 00:00 Test3 Testing message 3
92 4 2006-09-29 00:00 Test4 Testing message 4
94 3 aseq bseq messages in foo2
95 1 2006-09-29 00:00 Test1 Testing message 1
96 3 2006-09-29 00:00 Test3 Testing message 3
97 4 2006-09-29 00:00 Test4 Testing message 4
99 3 aseq bseq messages in inbox (*: current folder)
100 1 2006-09-29 00:00 Test1 Testing message 1
101 3 2006-09-29 00:00 Test3 Testing message 3
102 4 2006-09-29 00:00 Test4 Testing message 4
104 unseen > $actual 2>&1
107 # test fnext with the current folder not in the list
108 echo 'Current-Folder: foo1' >"$MMH/context"
109 echo 'inbox 1 3-4' > $expected
110 fnext -folders $folders > $actual 2>&1
113 # test fprev with the current folder not in the list
114 echo 'Current-Folder: foo1' >"$MMH/context"
115 echo 'inbox 1 3-4' > $expected
116 fprev -folders $folders > $actual 2>&1
119 # test fnext with current folder in the middle of the list
120 echo 'Current-Folder: foo2' >"$MMH/context"
121 echo 'inbox 1 3-4' > $expected
125 # test fprev with current folder in the middle of the list
126 echo 'Current-Folder: foo2' >"$MMH/context"
127 echo 'foo1 1 3-4' > $expected
131 # test fprev with current folder at the beginning of the list
132 echo 'Current-Folder: foo1' >"$MMH/context"
133 echo 'inbox 1 3-4' > $expected
137 # test fnext with current folder at the end of the list
138 echo 'Current-Folder: inbox' >"$MMH/context"
139 echo 'foo1 1 3-4' > $expected
143 # test fnext with no current folder
145 echo 'foo1 1 3-4' > $expected
149 # test fnext with only one folder in the list
153 echo 'inbox 1 3-4' > $expected
154 fnext -folders $folders > $actual 2>&1