aboutsummaryrefslogtreecommitdiff
path: root/test/notmuch-test
AgeCommit message (Collapse)Author
2012-04-28test: Add tests for 'config' commandPeter Wang
Start a new test script.
2012-04-07test: add some exclude testsMark Walters
Systematically test the exclude options for search. Also move the search existing exclude tests into the new test. There is some overlap between the two sets of tests but many of the existing ones are there because they triggered bugs in the past so I have kept them to ensure coverage.
2012-03-01emacs: Tests for user-defined sectionsDaniel Schoepe
A new file was added for notmuch-hello tests.
2012-02-04test: add test for hiding Original Message region at beginning of a messageDmitry Kurochkin
The test is currently broken and will be fixed by a subsequent patch. The patch adds a new file for tests of Emacs notmuch-show view. Based on patch by David Edmondson [1]. [1] id:"1327562380-12894-4-git-send-email-dme@dme.org"
2012-02-03test: remove ".sh" extension from the recently added Emacs testsDmitry Kurochkin
All test files, except for the recently added Emacs tests, do not have ".sh" extension. So remove it from the new test files for consistency.
2012-01-25test: Add address cleaning tests.David Edmondson
2012-01-25test: Add `test_emacs_expect_t'.David Edmondson
Add a new test function to allow simpler testing of emacs functionality. `test_emacs_expect_t' takes one argument - a lisp expression to evaluate. The test passes if the expression returns `t', otherwise it fails and the output is reported to the tester.
2012-01-14test: add tests for "notmuch reply" --reply-to=senderMark Walters
2011-12-28test: emacs: test notmuch-wash-subject-to-* functionsJani Nikula
Signed-off-by: Jani Nikula <jani@nikula.org>
2011-12-11test: add tests for hooksJani Nikula
Signed-off-by: Jani Nikula <jani@nikula.org>
2011-12-08test: tests for command-line-arguments.cDavid Bremner
This was needed because no current notmuch code exercises the NOTMUCH_OPT_STRING style arguments.
2011-12-06Merge branch 'release'David Bremner
Conflicts: NEWS Conflicts resolved by inserting the 0.10.2 stanza before 0.11
2011-12-05test: add tests for python bindingsDavid Bremner
We start modestly, with a (slightly modified) test case from Kazuo Teramoto. Originally it just made sure the bindings didn't crash; here we check that by comparing the output with that of notmuch search.
2011-11-26Merge branch 'release'David Bremner
2011-11-25test: add simple tests for online helpdebian/0.10.1-10.10.1David Bremner
Nothing fancy, but we can at least detect segmentation faults.
2011-11-18test: make all tests terminable with Ctrl-cTomi Ollila
Some tests don't break when HUP signal is sent tho those (by pressing ctrl-c on the terminal). Therefore, the top-level test script catches the HUP and sends TERM signal to the started test script.
2011-11-15test: add tests for notmuch search --offset and --limitJani Nikula
Signed-off-by: Jani Nikula <jani@nikula.org>
2011-11-15test: add tests for notmuch countJani Nikula
Signed-off-by: Jani Nikula <jani@nikula.org>
2011-11-14test: Add a test script for "notmuch tag"Austin Clements
2011-09-12test: Test atomicity of notmuch new.Austin Clements
This tests notmuch new's ability to recover from arbitrary stopping failures. It interrupts notmuch new after every database commit and, on every resulting database snapshot, re-runs notmuch new to completion and checks that the final database state is invariant.
2011-06-29test:Folder tags shouldn't match after removal of file in given folderMark Anderson
Test for bug. Current stemming support for notmuch adds extra terms to the DB which aren't removed when the file renames are detected. When folder tags are added to a message, Xapian terms for both XFOLDER and ZXFOLDER are generated. When one of the filenames are renamed/removed, only the XFOLDER tags are removed, leaving it possible for a match on a folder: tag that was previously but is no longer a match in the maildir.
2011-06-23tests: add a test for symbol hiding side effectsDavid Bremner
The worry here is that a binary linking with libnotmuch might lose access to Xapian::Error symbols because libnotmuch hides them. We are careful here to create ./fakedb/.notmuch in order to trigger a Xapian exception, and not just a missing file check. Thanks to jrollins and amddragon for suggestions. (cherry picked from commit 66f37f5f6864a988f94ddb893e3a176af57f6c8e)
2011-06-22tests: Add optional use of timeout utility, if present.David Bremner
Each top level test (basic, corpus, etc...) is run with a fixed timeout of 2 minutes. The goal here is to treat a hung test as a failure. The emacs test for sending mail is known to be problematic on the Debian autobuilders. This is both a bandaid fix for that, and a sensible long term feature. (cherry picked from commit 5f99c80e02736c90495558d9b88008a768876b29)
2011-05-27test: add crypto tests for signature verification and decryptionJameson Graef Rollins
This adds a new "crypto" test script to the test suite to test PGP/MIME signature verification and message decryption. Included here is a test GNUPGHOME with a test secret key (passwordless), and test for: * signing/verification * signing/verification with full owner trust * verification with signer key unavailable * encryption/decryption * decryption failure with missing key * encryption/decryption + signing/verfifying * reply to encrypted message * verification of signature from revoked key These tests are not expected to pass now, but will as crypto functionality is included.
2011-05-27test: change "#!/bin/bash" to "#!/usr/bin/env bash" enhances portabilityJoel Borggrén-Franck
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-23test: force deletion of test remnantsJameson Graef Rollins
This keeps the test from failing if only a subset of the remnants were available for deletion, because e.g. only a subset of the tests were run.
2011-05-23test: allow specifying tests to run with NOTMUCH_TESTS env varJameson Graef Rollins
This is useful for just running a specific subset of tests, ie: NOTMUCH_TESTS=crypto make test
2011-05-16test: Add a test of "notmuch show" with a multipart messageCarl Worth
This tests "notmuch show" with both --format=text and --format=json on a message with some non-trivial MIME multipart nesting, (multiple parts within a multipart/mixed part which is within a multipart/signed part). The test captures the current behavior (where only the leaf nodes of the MIME structure are emitted as a flat list---the multipart parts are effectively ignored). We plan to soon change the json output at least to emit an actual hierarchy matching the MIME structure, (at which point we will update this test).
2011-03-10Rename/rewrite the new emacs-forgetfulness test (to emacs-large-search-buffer)Carl Worth
The new name is more descriptive of the bug being tested. Also, the test is rewritten slightly so that it's much more plain to see how the bug manifests itself, (that messages are droped from the emacs result at regular intervals). Primarily, this is by collapsing the large blobs used to inflate the message subjects.
2011-03-10New test: Emacs' forgetfulness.Thomas Schwinge
Signed-off-by: Thomas Schwinge <thomas@schwinge.name>
2011-03-09test: Rename and clarify the search-lwn testCarl Worth
Now that we understand the bug here, we rename this test to search-insufficient-from-quoting to clarify the bug being exercised, (which occurs when the From: line contains an unquoted '.' character). We also mark these tests as expected failures until the bug gets fixed.
2011-03-09search: Move lwn tests into their own file.Carl Worth
Since it's much easier to debug and fix these if they can be run on their own.
2011-01-26test: Make it easier to resolve conflicts when adding new testsMichal Sojka
Currently, there are two places in the test framework that contain very long list on a single line. Whenever a test is added (or changed) in several branches and these branches are merged, it results in conflict which is hard to resolve because one has to go through the whole long line to find where the conflict is. This patch splits these long lists to several lines so that the conflicts are easier to resolve.
2011-01-26Add test demonstrating a position overlap bug.Carl Worth
Currently, whenever we call index_terms multiple times for a single field, the term generator is being reset to position 0 each time. This means that with text such as: To: a@b.c, x@y.z one can get a bogus match by searching for: To: a@y.c Thanks to Mark Anderson for reporting the bug, (and providing a nice, minimal test case that inspired what is used here).
2011-01-15test: Add new tests for folder-based searching.Carl Worth
This is a new feature which is not implemente yet, so these tests mostly fail currently. A subsequent commit will add the feature and cause these tests to start passing. These tests verify that we can search for containing folders of mail files by word or by phrase and that the search terms are updated correctly when directories are renamed.
2010-12-07Revert "test: Break on test script (or other) error"Carl Worth
This reverts commit f22a7ec1e28d1264cf9d67d78796b8ab22e09a35. Interrupting the test suite due to an actual bug in a test script would be just fine, but interrupting the run of the entire test suite at the first test failure is unacceptable.
2010-11-23test: Add simple tests for "notmuch search --output=<>"Carl Worth
This code simply wasn't being exercised by the test suite before, so this will be useful. Meanwhile, there's currently a bug in "notmuch search --output=tags" in that it doesn't print a final newline. But the current test suite isn't able to catch this bug since the $() construct of the shell doesn't preserve the distinction of whether the final newline is present or not.
2010-11-16test: Break on test script (or other) errorMichal Sojka
Break notmuch-test whenever a test script returns non-zero status. This happens either when some test from the script fails or when there is an error in the script. This is especially useful in the latter case since the error may not appear in the final aggregated results.
2010-11-10Tests for maildir synchronizationMichal Sojka
Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
2010-11-06Rename "notmuch cat" to "notmuch show --format=raw"Carl Worth
This is part of an effort to avoid proliferation of excessive top-level notmuch commands. Also, "raw" better captures the functionality here, (as opposed to "cat" which is a fairly oblique reference to a bad Unix abbreviation whose metaphor doesn't work here since "notmuch cat" operates only on a single message and hence cannot "con'cat'enate" anything).
2010-11-05Add 'cat' subcommandMichal Sojka
This command outputs a raw message matched by search term to the standard output. It allows MUAs to access the messages for piping, attachment manipulation, etc. by running notmuch cat rather then directly access the file. This will simplify the MUAs when they need to operate on a remote database. Edited-by: Carl Worth <cworth@cworth.org>: Remove trailing whitespace, add missing "test_done" to new test script to avoid "Unexpected exit" error.
2010-10-28test: Emit a friendly error message if run with bash < 4.0.Carl Worth
The bash code in the test suite is using associative arrays which were only added to bash as of release 4.0. If the test suite is run with an older bash, we now immediately error out and explain the situation, (instead of emitting confusing error messages and failing dozens of tests, which is what happened before this change).
2010-10-22test: Add the most rudimentary testing of the emacs interface.Carl Worth
So far, this is doing nothing more than adding a corpus of email and ensuring that the `notmuch-hello' function produces the desired output.
2010-09-20test: Fix the search and dump-restore tests to operator on non-empty mail store.Carl Worth
We do this with a new add_email_corpus function that establishes a mail store with 50 messages from the notmuch mailing list.
2010-09-20test: Print section names, and rename all test sectionsCarl Worth
Now that we can usefully pass section names via the NOTMUCH_SKIP_TESTS environment variable, it's useful to actually print those names out for the user. Then, since we're now printing these names, let's use nicer names, (not excessively long but also not using abbreviations like "msg").
2010-09-20test: Fix notmuch-test to pass command-line arguments to sub-scripts.Carl Worth
The is useful for things like "notmuch-test --valgrind", etc.
2010-09-17test: Rename all tests to get rid of the ugly numbers in file names.Carl Worth
The numbers were meaningless, and they made it hard to find a file of interest. Instead, we get the ordering we want by adding an explicit list of tests to run to the notmuch-test script.
2010-09-17test: Cleanup the test outputCarl Worth
This makes the new, git-derived test suite report results in a manner similar to the original notmuch test suite. Notable changes include: * No more initial '*' on every line * Only colorize a single word * Don't print useless test numbers * Use "PASS" in place of "ok" * Begin sentences with a capital letter * Print test descriptions for each block * Separate each block of tests with a blank line * Don't summarize counts between each block
2010-09-17test: Fix test suite to integrate with our non-recursive Makefile system.Carl Worth
This avoids "make test" emitting messages from three (3!) recursive invocations of make. We change the invocations of the tests themselves to occur directly from the shell script rather than having the shell script invoke make again and using wildcards in the Makefile.
2010-09-16Convert the actual tests to the new frameworkMichal Sojka
The changes are: - The notmuch-test was split into several files (t000?-*.sh). - Removed helper functions which were moved to test-lib.sh - Replaced every printf with test_expect_success. - Test commands chained with && (test-lib.sh doesn't use "set -e" in order to complete the test suite even if something fails) - Many variables such as ${MAIL_DIR} were properly quoted as they contain spaces. - Changed quoting patterns in add_message and generate_message (single quotes are already used by the test framework). - ${TEST_DIR} replaced by ${PWD} QUICK HOWTO: To run the whole test suite make To run only a single test ./t0001-new.sh To stop on the first error ./t0001-new.sh -i then mail store and database can be inspected in "trash directory.t0001-new" To see the output of tests ./t0001-new.sh -v To not remove trash directory at the end: ./t0001-new.sh -d To run all tests verbosely: make GIT_TEST_OPTS="-v" Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>