aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/maildir-sync
Commit message (Collapse)AuthorAge
* lib: Treat messages in new/ as maildir messages with no flags setGravatar Austin Clements2012-06-10
| | | | | | | | | | | | Previously, notmuch new only synchronized maildir flags to tags for files with a maildir "info" part. Since messages in new/ don't have an info part, notmuch would ignore them for flag-to-tag synchronization. This patch makes notmuch consider messages in new/ to be legitimate maildir messages that simply have no maildir flags set. The most visible effect of this is that such messages now automatically get the unread tag.
* test: Add broken test for tag synchronization on files delivered to new/Gravatar Austin Clements2012-06-10
| | | | | | | | | | | | | | | | | Currently, notmuch new only synchronizes maildir flags to tags for files that have an "info" part. However, in maildir, new mail doesn't gain the info part until it moves from new/ to cur/. Hence, even though mail in new/ doesn't have an info part, it is still a maildir message and thus has maildir flags (though none of them set). The most visible effect of not synchronizing maildir flags for messages in new/ is that newly delivered messages don't get the unread tag (unless it is assigned by some other mechanism, like new.tags). This patch does *not* modify the test for messages in cur/ that do not have an "info" part. Unlike a message in new/, a message in cur/ without an info part is no longer a maildir message, and thus shouldn't be subject to maildir flag synchronization.
* test: update tests to reflect the exclude flagGravatar Mark Walters2012-03-02
| | | | | | | notmuch show outputs the exclude flag so many tests using notmuch show failed. This commit adds "excluded:0" or "excluded: false" to the expected outputs. After this commit there should be no failing tests.
* show: Unify JSON header output for messages and message partsGravatar Austin Clements2012-03-01
| | | | | | | | | This has three ramifications: - Blank To and Cc headers are no longer output for messages. - Dates are now canonicalized for messages, which means they always have a day of the week and GMT is printed +0000 (never -0000) - Invalid From message headers are handled slightly differently, since they get parsed by GMime now instead of notmuch.
* test: Make generated message date a real dateGravatar Austin Clements2011-12-29
| | | | | | | | | January 5, 2001 was a Tuesday, not a Friday. Jameson fixed this exact problem for the multipart test in ec2b0a98cc, but not for generate_message itself. As Jameson pointed out in ec2b0a98cc, if we want to test date parsing, we should do it separately.
* test: Nix increment_mtime.Gravatar Austin Clements2011-06-29
| | | | | With the fix for the mtime race, this workaround is no longer necessary.
* fix sum moar typos [comments in source code]Gravatar Pieter Praet2011-06-23
| | | | | | | | | | Various typo fixes in comments within the source code. Signed-off-by: Pieter Praet <pieter@praet.org> Edited-by: Carl Worth <cworth@cworth.org> Restricted to just source-code comments, (and fixed fix of "descriptios" to "descriptors" rather than "descriptions").
* test: change "#!/bin/bash" to "#!/usr/bin/env bash" enhances portabilityGravatar Joel Borggrén-Franck2011-05-27
| | | | | | Change #!/bin/bash at start of tests to "#!/usr/bin/env bash". That way systems running on bash < 4 can prepend bash >= 4 to path before running the tests.
* tags_to_maildir_flags: Fix to preserve existing, unsupported flagsGravatar Carl Worth2010-11-11
| | | | | | This is to prevent notmuch from destroying any information the user has encoded as flags in the maildir filename. Tests are also added to the test suite to verify the documented behavior.
* notmuch_message_tags_to_maildir_flags: Do nothing outside of "new" and "cur"Gravatar Carl Worth2010-11-11
| | | | | | | | | | | Some people use notmuch with non-maildir files, (for example, email messages in MH format, or else cool things like using sluk[*] to suck down feeds into a format that notmuch can index). To better support uses like that, don't do any renaming for files that are not in a directory named either "new" or "cur". [*] https://github.com/krl/sluk/
* Enable maildir synchronization by default.Gravatar Carl Worth2010-11-11
| | | | | This is a useful feature that most people should want, so enable it by default, (still allowing customization to disable it of course).
* test: Drop test for propagating flag changes from one file to anotherGravatar Carl Worth2010-11-11
| | | | | | | | | | | There's nothing in the current API documentation that would suggest the behavior being tested here. Attempt to implement this could have some nasty side effects, (such as notmuch_message_maildir_flags_to_tags implicitly calling notmuch_message_tags_to_maildir_flags and maybe even opening up some bad looping possibilities). Much better to stick with what we have documented, which we believe will actually be useful, (and easy enough to comprehend).
* test: Add a new test that removal of a maildir flag also changes tagsGravatar Carl Worth2010-11-11
| | | | This test exposes an existing bug, so is currently failing.
* test: Rework recently-added additional maildir-sync testsGravatar Carl Worth2010-11-11
| | | | | | | | | | | | | | | These needed to be changed to be brought up to the current state of the maildir-sync tests. This includes style changes, but also the elimination of any assumption about pre-existing message filenames, (such as msg-003) which actually don't exist anymore. Also, the known broken tests are changed to emit FAIL rather than BROKEN simply to make them easier to fix, (so that they print the current problems rather than hiding them). Finally, an additional test is added to ensure that when a duplicate file is added without flags, it doesn't invalidate flags from other duplicates, (instead the flags are effectively merged).
* test: More maildir synchronization testsGravatar Michal Sojka2010-11-11
| | | | | | | | | Add maildir synchronization tests for multiple messages with the same message-id. As this is not yet implemented in notmuch, some of these teste are marked as BROKEN. I use $(< ) operator to avoid fiddling with stripped trailing newlines from test results which happens when output+=$(command) is used.
* test: Rework testing of maildir-synchronization feature.Gravatar Carl Worth2010-11-11
| | | | | | | | | | | | | | | | | | | | | | | | | | This change reworks these tests in several ways: 1. Bring tests into "new" test style preferring test_expect_equal over test_expect_success in almost all cases. 2. Don't emit test results for intermediate items not actually being tested, (things like "no new messages", "search for message", etc.). Those things are already covered by existing tests such as "basic" or "search" and only serve to obscure what's actually being tested. 3. Change sense of the test showing failure to rename a file from "new" to "cur" when "cur" doesn't exist. In this case, notmuch should detect that this is not a maildir and should not attempt to do any renaming of the file. 4. Extend dump/restore test to also exercise addition of tag, not just removal. Both items #3 and #4 above show shortcomings in the current implementation. These are currently resulting in test results of FAIL and indicate bugs that need to be fixed.
* Tests for maildir synchronizationGravatar Michal Sojka2010-11-10
Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>