frm: fix counters when given multiple mailboxes.
* frm/frm.c (frm): Initialize counters. * frm/tests/testsuite.at: Test multiple mailboxes.
Showing
2 changed files
with
17 additions
and
0 deletions
... | @@ -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 | ... | ... |
-
Please register or sign in to post a comment