Created attachment 325531 [details]
Test to check this, with a couple of message files
While testing the unit test uploaded at bug 436880, Standard8 found that it failed on his OS X build. The problem was finally traced to the CopyMessages function in nsMsgCopyService seemingly misbehaving and not working correctly. The function works correctly on my Windows trunk build, but not on OS X. (Later, beckley confirmed the same on both Windows and OS X.)
When an array of one message is passed to the function, it works as expected. However, then there's an array of two messages, only the first message seems to be copied, and then duplicated, in the destination message folder.
I've attached a simple test here to check this. To test this, apply the patch (-p1) to trunk, then go to $objdir/mailnews/base/test and run |make && make check|.
Created attachment 325532 [details]
Log on Windows (test succeeds)
This is from my trunk build on Windows Vista.
As can be seen, the source message IDs and the destination IDs are both unique.
Created attachment 325533 [details]
Log on Mac OS X (test fails)
Thanks to Standard8 for providing the log.
The source message IDs seem to be fine, but the destination IDs are both the same, so the do_check_neq fails.
Standard8 also reported that the mbox had just one message in it, and not both.
(This hasn't been tested on Linux so far.)
Fixed by attachments 326410 and 326411 in bug 436880.