aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
Commit message (Collapse)AuthorAge
* test: check for gdb in insert testsGravatar David Bremner2014-10-18
| | | | | Commits a6cee01 and c48b12f otherwise break the build for people without gdb.
* test/insert: check that indexing errors are accepted with --keepGravatar David Bremner2014-10-18
| | | | | This is overkill for the current code path, but should provide some robustness for future changes in error handling.
* cli/insert: require succesful message indexing for success statusGravatar Jani Nikula2014-10-18
| | | | | | Add --keep option to keep any remaining stuff in index or file. We could distinguish between failures to index and failures to apply tags or maildir sync, but for simplicity just have one.
* test/insert: add known broken tests for indexing failuresGravatar David Bremner2014-10-18
| | | | | These tests are written with the assumption that we want all indexing failures to be considered as failures by notmuch insert.
* test: Port atomicity test to PythonGravatar Austin Clements2014-10-05
| | | | | | | | Previously, this was implemented using a horrible GDB script (because there is no such thing as a non-horrible GDB script). This GDB script often broke with newer versions of GDB for mysterious reasons. Port the test script to GDB's Python API, which makes the code much cleaner and, hopefully, more stable.
* configure: add debug flags by default.Gravatar David Bremner2014-10-05
| | | | | | This makes development (in particular the test suite) easier. Those concerned about the extra diskspace can override the default or use strip.
* test: check for debug symbols in notmuchGravatar David Bremner2014-10-05
| | | | | | | | | In the future, tests may rely on debug symbols being present in notmuch, so we plan to switch the default flags. The main purpose of this test is to help explain the perhaps mysterious failures of other tests which rely on symbols being present.
* emacs: Fix coding system in `notmuch-show-view-raw-message'Gravatar Austin Clements2014-09-21
| | | | | This fixes the known-broken test of viewing 8bit messages added by the previous commit.
* test: New tests for Emacs charset handlingGravatar Austin Clements2014-09-21
| | | | | | The test of viewing 8bit messages is known-broken. The rest pass, but for very fragile reasons. The next several commits will fix the known-broken test and make our charset handling robust.
* test/emacs: globally force the html renderer to html2textGravatar David Bremner2014-09-21
| | | | | | Previously we did this for a single test, but some other proposed tests ( id:1398105468-14317-3-git-send-email-amdragon@mit.edu ) show similar breakage when switching renderers.
* test: simplify T360-symbol-hiding, use nm instead of objdumpGravatar David Bremner2014-09-13
| | | | | | | | | | | | | | | After yet another variation in objdump output caused this test to fail (on a Debian port, no less), I decided whatever putative benefit we get from looking at the object files instead of the library isn't worth the maintenence headache. This version uses nm -P. nm -P should be portable, and fixed format. It purposely doesn't use the -D argument, since that is non-POSIX and nm on GNU/Linux seems do the right thing without it. It still won't work out of the box on e.g. Mac OS/X. I think the right thing to do there is to move some more configuration information into sh.config.
* cli: Be more helpful when .notmuch-config does not existGravatar Austin Clements2014-09-07
| | | | | | | | | | | | Previously, if the user ran any subcommand that required a configuration (e.g., notmuch new) but didn't have a configuration, notmuch would give the rather un-friendly and un-actionable message Error reading configuration file .notmuch-config: No such file or directory Since this condition is expected for new users, this patch adds specific handling for the file-not-found case to give a message that is friendly and actionable.
* test: Tests for future version and unknown feature handlingGravatar Austin Clements2014-08-30
|
* test: Tool to build DB with specific version and featuresGravatar Austin Clements2014-08-30
| | | | This will let us test basic version and feature handling.
* new: Don't report version after upgradeGravatar Austin Clements2014-08-30
| | | | | | | | | | The version number has always been pretty meaningless to the user and it's about to become even more meaningless with the introduction of "features". Hopefully, the database will remain on version 3 for some time to come; however, the introduction of new features over time in version 3 will necessitate upgrades within version 3. It would be confusing if we always tell the user they've been "upgraded to version 3". If the user wants to know what's new, they should read the news.
* Make parsing of References and In-Reply-To header less error proneGravatar Michal Sojka2014-08-16
| | | | | | | | | | | | | | | | According to RFC2822 References and In-Reply-To headers are supposed to contain one or more Message-IDs, however older RFC822 allowed almost any content. When both References and In-Reply-To headers ends with something else that a Message-ID (see e.g. [1]), the thread structure presented by notmuch is incorrect. The reason is that notmuch treats this case as if the email contained no "replyto" information (see _notmuch_database_link_message_to_parents). This patch changes the parse_references() function to return the last valid Message-ID encountered rather than NULL resulting from the last hunk of text not being the Message-ID. [1] https://lkml.org/lkml/headers/2014/5/19/864
* Add test for incorrect threading of messagesGravatar Michal Sojka2014-08-16
| | | | | | This happens when there is some garbage after the last Message-ID in the References header. See for example https://lkml.org/lkml/headers/2014/5/19/864.
* test: Include generated dependencies for test sourcesGravatar Austin Clements2014-08-06
| | | | | | | | Previously the build system was generating automatic header dependencies for test sources, but only smtp-dummy was in SRCS, so only its dependencies were being included. Add all of the test sources to SRCS so that the root Makefile.local includes their dependencies.
* emacs: Expand default saved searches and add shortcut keysGravatar Austin Clements2014-08-05
| | | | | | This should help new users off to a better start with the addition of more sensible saved searches and default shortcut keys. Most existing users have probably customized this variable and won't be affected.
* dump: make dump take Xapian write lockGravatar Mark Walters2014-07-16
| | | | | | | | | | | | | | | | | | | | | | | Dump currently only takes the read lock. Xapian can cope with some changes while maintaining a read snapshot but with more changes it fails. Currently notmuch just gives a xapian error. To avoid this we take the write lock when dumping. This prevents other notmuch processes from modifying the xapian database preventing this error. Discussion with Olly on irc indicates that this is currently the best solution: in xapian trunk there may be better possibilities using snapshots but they need to make it to a release and propogate out to users before we can switch approach. Finally, this breaks one use case: pipelines of the form notmuch dump | ... | notmuch restore According to Olly this is already very fragile: it will only work on small databases. One of the tests relies on this behaviour so fix that to store the dump rather than use a pipe.
* test: Test thread linking in all possible delivery ordersGravatar Austin Clements2014-07-16
| | | | | | | | | | | | These tests deliver all possible (single-root) four-message threads in all possible orders and check that notmuch successfully links them into threads. These tests supersede and replace the previous and much less thorough "T260-thread-order" tests. There are two variants of the test: one delivers messages that reference only their immediate parent and the other delivers messages that reference all of their parents. The latter test is currently known-broken.
* test: redirect gdb output to a file.Gravatar David Bremner2014-07-13
| | | | | It seems that the normal output redirection in the test suite doesn't work for gdb, but it's nice to have output in a file for debugging.
* test: make test_emacs call post-command-hookGravatar David Bremner2014-07-13
| | | | | | | | | | | | | | The unread/read changes will use the post-command-hook. test_emacs does not call the post-command-hook. This adds a notmuch-test-progn which takes a list of commands as argument and executes them in turn but runs the post-command-hook after each one. The caller can batch operations (ie to stop post-command-hook from being interleaved) by wrapping the batch of operations inside a progn. We also explicitly run the post-command-hook before getting the output from a test; this makes sense as this will be a place the user would be seeing the information.
* test: use sh.config for configurationGravatar Jani Nikula2014-07-13
|
* Merge branch 'release'Gravatar David Bremner2014-06-22
|\ | | | | | | Austin's termpos patches and Felipe's zlib.pc workaround
| * lib: Separate all phrases indexed by _notmuch_message_gen_termsGravatar Austin Clements2014-06-18
| | | | | | | | | | | | | | | | | | | | | | | | This adds a 100 termpos gap between all phrases indexed by _notmuch_message_gen_terms. This fixes a bug where terms from the end of one header and the beginning of another header could match together in a single phrase and a separate bug where term positions of un-prefixed terms overlapped. This fix only affects newly indexed messages. Messages that are already indexed won't benefit from this fix without re-indexing, but the fix won't make things any worse for existing messages.
| * test: Known-broken test for overlapping/adjacent termposGravatar Austin Clements2014-06-18
| | | | | | | | | | | | | | | | This adds two known-broken tests and one working test related to the term positions assigned to terms from different headers or MIME parts. The first test fails because we don't create a termpos gap between different headers. The second test fails because we don't adjust termpos at all when indexing multiple parts.
| * lib: Index name and address of from/to headers as a phraseGravatar Austin Clements2014-06-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, we indexed the name and address parts of from/to headers with two calls to _notmuch_message_gen_terms. In general, this indicates that these parts are separate phrases. However, because of an implementation quirk, the two calls to _notmuch_message_gen_terms generated adjacent term positions for the prefixed terms, which happens to be the right thing to do in this case, but the wrong thing to do for all other calls. Furthermore, _notmuch_message_gen_terms produced potentially overlapping term positions for the un-prefixed copies of the terms, which is simply wrong. This change indexes both the name and address in a single call to _notmuch_message_gen_terms, indicating that they should be part of a single phrase. This masks the problem with the un-prefixed terms (fixing the two known-broken tests) and puts us in a position to fix the unintentionally phrases generated by other calls to _notmuch_message_gen_terms.
| * test: Add search tests for combined name/address queriesGravatar Austin Clements2014-06-18
| | | | | | | | | | | | | | | | Two of these are currently known-broken. We index the name and address parts in two separate calls to _notmuch_message_gen_terms. Currently this has the effect of placing the term positions of the prefixed terms from the second call right after those of the first call, but screws up the term positions of the non-prefixed terms.
| * test: Fix from/to search test queriesGravatar Austin Clements2014-06-18
| | | | | | | | | | | | Two of the search tests for "from" and "to" queries were clearly trying to search for prefixed phrases, but forgot to shell quote the phrases. Fix this by quoting them correctly.
* | Merge branch 'release'Gravatar David Bremner2014-06-13
|\| | | | | | | Merge in a few more commits towards 0.18.1
| * lib: resurrect support for single-message mbox filesGravatar Jani Nikula2014-06-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is effectively a revert of commit 6812136bf576d894591606d9e10096719054d1f9 Author: Jani Nikula <jani@nikula.org> Date: Mon Mar 31 00:21:48 2014 +0300 lib: drop support for single-message mbox files The intention was to drop support for indexing new single-message mbox files (and whether that was a good idea in the first place is arguable). However this inadvertently broke support for reading headers from previously indexed single-message mbox files, which is far worse. Distinguishing between the two cases would require more code than simply bringing back support for single-message mbox files.
| * test: use --quick when starting emacs.Gravatar David Bremner2014-06-13
| | | | | | | | | | | | | | | | | | | | At least in emacs24, this removes the "site-lisp" directories from the load path in addition to enforcing --no-site-lisp --no-init-file. This works around a slightly mysterious bug on Debian that causes test-lib.el not to load when there is cl-lib.el(c) in some site-lisp directory. It should be harmless in general since we really don't want to load any files from addon packages to emacs.
* | build: add datacleanGravatar David Bremner2014-05-28
| | | | | | | | | | | | | | | | | | It turns out to be inconvenient to delete the downloaded datafiles with distclean, so I propose a new target which does that instead. The closest conventional target is 'maintainer-clean'; the difference here is that having the original source tarball is not enough to reconstruct these files.
* | Merge branch 'release'Gravatar David Bremner2014-05-18
|\| | | | | | | bugfix release being built up on release.
| * test: allow pending break points in atomicity script.Gravatar David Bremner2014-05-18
| | | | | | | | | | This seems to fix problems with the symbol rename not being defined at startup on at least OS/X and some Debian Linux architectures.
| * test/Makefile.local: Added configured TALLOC_LDFLAGS.Gravatar Charles Celerier2014-05-18
| | | | | | | | | | | | | | | | The linking to talloc is hard-coded in the testing Makefile. This patch causes the linking to talloc to be done according to how TALLOC_LDFLAGS was configured. Signed-off-by: Charles Celerier <cceleri@cs.stanford.edu>
* | test: add have-man and have-compact in test/.gitignoreGravatar Jani Nikula2014-05-03
|/ | | | Sort the file while at it.
* test: use test_expect_equal for PATH test, update messageGravatar David Bremner2014-04-18
| | | | | | | | - The old test was quite impossible to debug; the new one shows the difference between the two directories, if any. - "repository" doesn't make sense for out of tree builds. Or tarball builds, for that matter.
* test: verify tag backup generated by database upgradeGravatar David Bremner2014-04-12
| | | | | 'pre upgrade dump' is not much of a test, but at least this way we get somewhat sensible behaviour if it fails.
* notmuch-new: backup tags before database upgradeGravatar David Bremner2014-04-12
| | | | | | | | All we do here is calculate the backup filename, and call the existing dump routine. Also take the opportunity to add a message about being safe to interrupt.
* restore: transparently support gzipped inputGravatar David Bremner2014-04-12
| | | | | | We rely completely on zlib to do the right thing in detecting gzipped input. Since our dump format is chosen to be 7 bit ascii, this should be fine.
* test: restore with missing final newlineGravatar David Bremner2014-04-12
| | | | | Recent proposed patches for gzipped input had a bug with handling missing newlines that was not caught by the current test suite
* dump: support gzipped and atomic outputGravatar David Bremner2014-04-12
| | | | | | | | | | | | | The main goal is to support gzipped output for future internal calls (e.g. from notmuch-new) to notmuch_database_dump. The additional dependency is not very heavy since xapian already pulls in zlib. We want the dump to be "atomic", in the sense that after running the dump file is either present and complete, or not present. This avoids certain classes of mishaps involving overwriting a good backup with a bad or partial one.
* lib: drop support for single-message mbox filesGravatar Jani Nikula2014-04-05
| | | | | | | We've supported mbox files containing a single message for historical reasons, but the support has been deprecated, with a warning message while indexing, since Notmuch 0.15. Finally drop the support, and consider all mbox files non-email.
* test: conditionally test help system depending on configured supportGravatar Jani Nikula2014-03-26
| | | | | If neither sphinx nor rst2man is available, the notmuch man pages will not be available. Take this into account in the help system test.
* emacs: Use whitelist instead of blacklist for term escapingGravatar Austin Clements2014-03-25
| | | | | | | | | | | | Previously, the term escaper used a blacklist of characters that needed escaping. This blacklist turned out to be somewhat incomplete; for example, it did not contain non-whitespace ASCII control characters or Unicode "fancy quotes", both of which do require the term to be escaped. Switch to a whitelist of characters that are definitely safe to leave unquoted. This fixes the broken test introduced by the previous patch.
* test: Add broken test for Emacs boolean term escapingGravatar Austin Clements2014-03-25
| | | | | | The current term escaper gets most of these right, but fails to escape things containing Unicode "fancy quotes" or things containing non-whitespace control characters.
* test: conditionally test compact depending on configured supportGravatar Jani Nikula2014-03-25
| | | | | | I still have one machine with old enough Xapian to not have compaction support. Make the tests check for unsupported compact operation when compact is not available.
* test: use $(srcdir) instead of . as include pathGravatar David Bremner2014-03-25
| | | | | This is needed for out of tree builds. The functional change is the modification of extra_cflags; the other changes are cosmetic.