aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2010-10-27test: Use an explicit date in the message sent via (fake) SMTPCarl Worth
Simply setting an explicit date is cleaner than letting the current, (arbitrary), date get generated for the email message and then constantly filtering that date out of search results.
2010-10-27emacs: Explicitly set the From address when composing a new message.Carl Worth
Previously, underlying emacs code was setting this header. Now, we do the right thing and query the notmuch configuration for the default value here.
2010-10-27emacs: Enable FCC (to a directory named "sent") by default.Carl Worth
Now that the FCC code is fixed to use the notmuch database path, we can actually enable this by default, which should be highly useful for all new users of notmuch.
2010-10-27emacs: Change FCC to be relative to notmuch mail store, not message-directoryCarl Worth
Otherwise, FCC is too hard to use, (user must set it and also set message- directory variable to match notmuch mail datbase path). As a rule, I'd like for users of notmuch to not be required to muck around with non-notmuch mail settings in emacs. The above is only really possible now thanks to the recent addition of the "notmuch config get" command which allows emacs to query the currently configured notmuch database path. This also now allows an absolute-path FCC to be set if desired.
2010-10-27notmuch config: Allow for new "notmuch config set" in addition to getCarl Worth
It is now possible to set configuration items from the command-line in a manner quite similar to the support for querying configuration items.
2010-10-27notmuch config: Provide support for querying non-standard configuration values.Carl Worth
We might as well be general here, and allow the "notmuch config" command to query any stored value from the configuration file, (whether or not the rest of the code actually knows anything about that value).
2010-10-27notmuch: Add a new "notmuch config" command for querying configuration.Carl Worth
So far, we implement only "notmuch config get". It won't be too much work from here to also implement "notmuch config set".
2010-10-27TODO: Note idea for a new "notmuch compose"Carl Worth
Which would also allow the recently added test of sending an email message with the emacs interface to be a little more honest about the From address.
2010-10-27test: Add test that emacs interface actually sends mail.Carl Worth
Rather than *reall* sending mail here, we instead have a new test program, smtp-dummy which implements (a small piece of) the server-side SMTP protocol and saves a mail message to the filename provided. This gives us reasonable test coverage of a large chunk of the notmuch+emacs code base (down to talking to an SMTP server with the final mail contents).
2010-10-27test: Set alternate HOME during tests.Carl Worth
We set the HOME environment variable to the test directory to avoid the tests relying on any configuration files from the test author's own home directory, (such as ${HOME}/.emacs or similar).
2010-10-22test: Fix false failure from the "available tests" test.Carl Worth
We recently added a new sub-directory below test, so we have to blacklist it explicitly in this test.
2010-10-22notmuch search: Fix to handle failure of notmuch_query_search_threads.Carl Worth
Now that notmuch_query_search_threads can return NULL, (for example, due to a Xapian exception), we need to handle that case (rather than just segfault). It's simple enough to just return a non-zero exit code.
2010-10-22lib: Fix notmuch_query_search_threads to return NULL on any Xapian exception.Carl Worth
Previously, if the underlying search_messages hit an exception and returned NULL, this function would ignore that and return a non-NULL, (but empty) threads object. Fix this to properly propagate the error.
2010-10-22emacs: Fix quoting of Message-Id to fix test case of Id containing ".."Carl Worth
If Xapian sees unquoted ".." as in id:123..456 then it thinks that's a range specification. We avoid this problem by instead passing id:"123..456" to Xapian.
2010-10-22test: Add test demonstrating failure in emacs interface when Message-Id has ..Carl Worth
Thanks to Jameson Rollins for pointing out this bug (id:87y6g7zr6q.fsf@servo.finestructure.net).
2010-10-22test: Add tests for adding/removing tags within emacs interfaceCarl Worth
Exercising both the notmuch-search and notmuch-show views.
2010-10-22test: Add simple tests for navigating notmuch-hello and notmuch-search viewsCarl Worth
We simulate the act of selecting the "inbox" saved search from notmuch-hello and the act of selecting a desired thread from the notmuch-search results. The test for the navigation of notmuch-hello is currently marked as BROKEN since its output is in the opposite order compared to the '(notmuch-search "tag:inbox")' test. This question of ordering is a currently open issue on the notmuch mailing list, so we'll let the test suite reflect that for now. Finally, this commit also abstracts some common emacs lisp code, (waiting for the current buffer's process to complete), into a new notmuch-test-wait function that is made available to anything calling test_emacs.
2010-10-22test: Add a new test_expect_equal_failureCarl Worth
Which allows us to have a known-broken test that would otherwise use test_expect_equal.
2010-10-22test: Add tests for emacs notmuch-search and notmuch-show functions.Carl Worth
Moving the expected output into individual files (rather than inline) to keep the test script much easier to read.
2010-10-22emacs: Remove the joke from the first line of the notmuch-hello view.Carl Worth
Overuse just makes the joke unfunny.
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-10-22test: Add a new test_emacs function to test-lib.shCarl Worth
This should be quite handy for doing automated testing of the emacs-based functionality in notmuch. This function invokes emacs with the necessary command-line arguments, (to run in batch mode with no local initialization, to load the notmuch code from the source directory, and to ensure an 80-column width).
2010-10-22test: Fix add_email_corpus function to be quiet.Carl Worth
This simply avoids some unneeded noise in the "make test" output.
2010-10-22emacs: Fix notmuch-hello to not break when given a very narrow window.Carl Worth
Simply ensure that some subtractions never result in a negative number, (since emacs complains when asked to create a string with a negative length).
2010-10-12TODO: Add some notes to fix some recently noted problems.Carl Worth
Just don't want to forget about things that people have pointed out.
2010-09-23emacs: Fix bug when parsing a subject cotaining: \[[0-9/]\]Carl Worth
That is, a subject with a bracketed set of digits (and optionally a slash), for example "[2010]" would cause the emacs code to misparse the search results. Fix this by tweaking the regular expression.
2010-09-21lib: Fix "make install"Carl Worth
This has been broken since the addition of the test sub-directory to our non-recursive make system.
2010-09-20test/README: Document add_email_corpus (and add_message/generate_message)Carl Worth
While adding the documentation here for add_email_corpus I noticed that the other email-adding functions in test-lib.sh were not yet documented here, so add all of that documentation.
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: Add a corpus of email messages to be used in testing.Carl Worth
This is simply 50 messages from the early history of the notmuch mailing list, (fetched from the public archives).
2010-09-20test: Remove useless NOTMUCH variable (in favor of simply "notmuch")Carl Worth
When the NOTMUCH variable was originally invented it was used as an explicit path to the notmuch binary being tested. Today, the test suite sets the PATH variable instead, so the NOTMUCH variable always has a value of simply "notmuch". We simplifying that by using the constant value rather than the continual variable reference.
2010-09-20test: Remove some dead code in test-lib.shCarl Worth
These assignements weren't being used at all and were just confusing me, (the real assignments happen later on in the file).
2010-09-20test: Fix PATH-checking test to work with --valgrindCarl Worth
The --valgrind option munges the PATH variable, so un-munge it before testing that we have PATH pointing to the source directory.
2010-09-20lib: Fix use-after-free bug.Carl Worth
Thanks to the new git-based test suite, it's easy to run the whole test suite in valgrind, (simply "make test OPTIONS="--valgrind"), and doing so showed this obvious use-after-free bug, (triggered by the thread-order tests).
2010-09-20test: Fix to actually report errors (!).Carl Worth
A bug in the results-aggregation code was causing the test suite to report "all tests passed" even when there were failures, (as long as there were also no "broken" tests). Fix this.
2010-09-20test: Avoid printing "Testing Testing ..."Carl Worth
The test suite isn't auditioning for a roadie position, after all.
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: Make the --valgrind option useful, (and drop --verbose).Carl Worth
In order for --valgrind to be useful, we drop noisy additional output of all of the commands being executed in verbose mode. This makes --verbose alone quite useless, so we don't document it any more. Also, add a zlib valgrind suppression that was showing up frequently in the test suite.
2010-09-20test/README: Update to become notmuch-specific rather than git-specificCarl Worth
This file was obviously describing the git test suite previously, and would have been very hard to understand in the context of the notmuch test suite. HOpefully it's easier to follow now.
2010-09-20test: Rename GIT_SKIP_TESTS to NOTMUCH_SKIP_TESTSCarl Worth
By scanning test-lib.sh for occurrences of "git" or "GIT", I found that most of those are internal things, (like the GIT_TEST_TEE_STARTED variable). But GIT_SKIP_TESTS is part of the user-interface to the test suite, so we rename it to reference notmuch rather than git. Also, the GIT_TRACE warning is git-specific, so we drop that as well.
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-20test: Fix test suite so that --valgrind option works.Carl Worth
The output is ugly, and we need a better suppressions file, but this is at least a start.
2010-09-20test: Add test to ensure that all available test scripts are runCarl Worth
Since we are now using an explicit list of tests to run in notmuch-test we need to be careful that we don't add a new file of tests and then forget to add it to the list.
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: Remove basic testing of broken, fixed, and skipped tests.Carl Worth
These were interfering with the aggregate statistics reported at the end of the test-suite run. (Always reporting 1 broken, 1 fixed, and 1 skipped). The correct way to test the test-suite itself would be to run the test suite externally for these cases, capture the expected result, and then report that as a PASS test. But, really, there's almost no value in these tests anyway. It's almost to the level of testing that 'if false; exit 1; fi' returns 1. That is, there are so many ways that the test suite could be broken internally, that these minor tests don't really help.
2010-09-17test: Fix ordering of tests in t0000-basic.shCarl Worth
The basic notmuch tests depend on the test-suite harness working, so test it first.
2010-09-17test: Rework test-suite input to avoid ulti-command stringsCarl Worth
The original git test suite works by concatenating many commands into a very long string (each separated by &&). This is painful to work with since it prevents the editor from helping by parsing the shell script, indenting, colorizing, etc. Instead, we switch this back to something like the original notmuch test suite, and add two new functions to test-lib.sh (test_begin_subtest and test_expect_equal) to support these. This also fixes the test suite to once again display the diff when a test fails to generate the expected input.
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-16test: Set all times to UTCMichal Sojka
In order to have repeatable test suite, all times in messages are set to UTC time zone to match the time zone (TZ variable) set in test-lib.sh. Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>