Commit graph

12 commits

Author SHA1 Message Date
Austin Clements
47afbdfb79 test: Nix increment_mtime.
With the fix for the mtime race, this workaround is no longer
necessary.
2011-06-29 15:26:45 -07:00
Pieter Praet
8bb6f7869c fix sum moar typos [comments in source code]
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").
2011-06-23 15:58:39 -07:00
Joel Borggrén-Franck
3fa843216c test: change "#!/bin/bash" to "#!/usr/bin/env bash" enhances portability
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.
2011-05-27 14:03:28 -07:00
Carl Worth
96d99c3837 tags_to_maildir_flags: Fix to preserve existing, unsupported flags
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.
2010-11-11 16:36:02 -08:00
Carl Worth
95dd5fe5d7 notmuch_message_tags_to_maildir_flags: Do nothing outside of "new" and "cur"
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/
2010-11-11 14:32:17 -08:00
Carl Worth
28708d2bd3 Enable maildir synchronization by default.
This is a useful feature that most people should want, so enable it by
default, (still allowing customization to disable it of course).
2010-11-11 04:11:21 -08:00
Carl Worth
483f422699 test: Drop test for propagating flag changes from one file to another
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).
2010-11-11 03:47:11 -08:00
Carl Worth
0100df8edb test: Add a new test that removal of a maildir flag also changes tags
This test exposes an existing bug, so is currently failing.
2010-11-11 03:40:19 -08:00
Carl Worth
0b6349d705 test: Rework recently-added additional maildir-sync tests
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).
2010-11-11 03:40:19 -08:00
Michal Sojka
2638fb7565 test: More maildir synchronization tests
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.
2010-11-11 02:35:03 -08:00
Carl Worth
882b994c17 test: Rework testing of maildir-synchronization feature.
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.
2010-11-11 02:35:03 -08:00
Michal Sojka
736ac42c45 Tests for maildir synchronization
Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
2010-11-10 13:09:32 -08:00