Commit 9572dc81 9572dc81dd060ad6a2a5ccae13efbb7ccf0608ef by Sergey Poznyakoff

frm: fix counters when given multiple mailboxes.

* frm/frm.c (frm): Initialize counters.
* frm/tests/testsuite.at: Test multiple mailboxes.
1 parent 1ec3df9a
...@@ -261,6 +261,7 @@ frm (char *mailbox_name) ...@@ -261,6 +261,7 @@ frm (char *mailbox_name)
261 int status; 261 int status;
262 262
263 selected = 0; 263 selected = 0;
264 counter.new = counter.read = counter.unread = 0;
264 frm_scan (mailbox_name, frm_select, &total); 265 frm_scan (mailbox_name, frm_select, &total);
265 266
266 if (show_summary) 267 if (show_summary)
......
...@@ -107,3 +107,19 @@ FRMTEST([frm -l on long headers],[frm07], ...@@ -107,3 +107,19 @@ FRMTEST([frm -l on long headers],[frm07],
107 ]) 107 ])
108 m4_popdef([FRM_MAILBOX]) 108 m4_popdef([FRM_MAILBOX])
109 109
110
111 AT_SETUP([multiple mailboxes])
112 AT_KEYWORDS([frm08])
113 AT_CHECK([
114 cp $abs_top_srcdir/testsuite/spool/mbox $abs_top_srcdir/testsuite/spool/mbox1 .
115 frm FRM_OPTIONS -qS mbox mbox1],
116 [1],
117 [mbox:
118 Folder contains 1 new message.
119 mbox1:
120 Folder contains 5 new messages.
121 ])
122
123 AT_CLEANUP])
124
125
......