aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* performance-test: add units to In and OutGravatar David Bremner2012-11-29
| | | | | Austin Read enough Fine Manuals to figure out this is in multiples of 512 bytes.
* performance-test/README: update instructions for fetching corpus.Gravatar David Bremner2012-11-29
| | | | It turns out not everybody on the planet has my gpg key.
* test: Don't print 'nil' at the beginning of emacs-subject-to-filenameGravatar Austin Clements2012-11-29
|
* test: Use associative arrays to track external prereqsGravatar Austin Clements2012-11-29
| | | | | | | | | | | | | Previously, the test framework generated a variable name for each external prereq as a poor man's associative array. Unfortunately, prereqs names may not be legal variable names, leading to unintelligible bash errors like test_missing_external_prereq_emacsclient.emacs24_=t: command not found Using proper associative arrays to track prereqs, in addition to being much cleaner than generating variable names and using grep to carefully construct unique string lists, removes restrictions on prereq names.
* test: Abort driver if a test script abortsGravatar Austin Clements2012-11-29
| | | | | | | | | | | | | | | | | | Previously, if a test script aborted (e.g., because it passed too few arguments to a test function), the test driver loop would simply continue on to the next test script and the final results would declare that everything passed (except that the test count would look suspiciously low, but maybe you just misremembered how many tests there were). Now, if a test script exits with a non-zero status and did not produce a final results file, we propagate that failure out of the driver loop immediately. To keep this simple, this patch removes the PID from the test-results file name. This PID was inherited from the git test system and seems unnecessary, since the file name already includes the name of the test script and the test-results directory is created anew for each run.
* test: Make the emacsclient binary user-configurableGravatar Austin Clements2012-11-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | And require that if TEST_EMACS is specified, so is TEST_EMACSCLIENT. Previously, the test framework always used "emacsclient", even if the Emacs in use was overridden by TEST_EMACS. This causes problems if both Emacs 23 and Emacs 24 are installed, the Emacs 23 emacsclient is the system default, but TEST_EMACS is set to emacs24. Specifically, with an Emacs 24 server and an Emacs 23 client, emacs tests that run very quickly may produce no output from emacsclient, causing the test to fail. The Emacs server uses a very simple line-oriented protocol in which the client sends a request to evaluate an expression and the server sends a request to print the result of evaluation. Prior to Emacs bzr commit 107565 on March 11th, 2012 (released in Emacs 24.1), if multiple commands were sent to the emacsclient between when it sent the evaluation command and when it entered its receive loop, it would only process the first response command, ignoring the rest of the received buffer. This wasn't a problem with the Emacs 23 server because it sent only the command to print the evaluation result. However, the Emacs 24 server first sends an unprompted command specifying the PID of the Emacs server, then processes the evaluation request, then sends the command to print the result. If the evaluation is fast enough, it can send both of these commands before emacsclient enters the receive loop. Hence, if an Emacs 24 server is used with an Emacs 23 emacsclient, it may miss the response printing command, ultimately causing intermittent notmuch test failures.
* test: Quote $output in calls to test_expect_equalGravatar Austin Clements2012-11-27
| | | | | | | | Previously, many tests in emacs-subject-to-filename didn't quote the $output argument to test_expect_equal. As a result, if $output was empty, test_expect_equal would be passed only one argument and would abort the entire test script. By quoting the argument, we ensure test_expect_equal will always receive two arguments.
* new: Skip ignored broken symlinksGravatar Austin Clements2012-11-26
| | | | | | | | | We now test for user ignore patterns before attempting to determine if a directory entry is itself a directory. As a result, we no longer abort for broken symlinks if the user has explicitly ignored them. This fixes the test added in the previous patch. It also slightly changes the debug output checked by another test of ignores.
* test: Add a test for skipping ignored broken symlinksGravatar Austin Clements2012-11-26
| | | | | Currently marked as broken because we abort on broken symlinks, even if they are in the ignore list.
* emacs: less guessing of character set in messagesGravatar Tomi Ollila2012-11-26
| | | | | | | | | | | | | | | The macro with-current-notmuch-show-message executes command `notmuch show --format=raw id:...` which just outputs the contents of the mail file verbatim (into temporary buffer). In case e.g. utf-8 locale is used the temporary buffer has buffer-file-coding-system as utf-8. In this case Emacs converts the data to multibyte format, guessing that input is in utf-8. However, the "raw" (MIME) message may contain octet data in any other 8bit format, and as no (MIME-)content spesific handling to the message is done at this point, conversion to other formats may lose information. By setting coding-system-for-read 'no-conversion drops the conversion part and makes this handle input as notmuch-get-bodypart-internal() does. This marks the broken test in previous change fixed.
* test/emacs: test saving of attachment containing 8bit octetsGravatar Tomi Ollila2012-11-26
| | | | | | This test catches the case 8bit octets in an attachment gets converted or lost when saving attachment to the file. This test is marked known broken.
* lib: Reject multi-message mboxes and deprecate single-message mboxGravatar Austin Clements2012-11-26
| | | | | | | | Previously, we would treat multi-message mboxes as one giant email, which, besides the obvious incorrect indexing, often led to out-of-memory errors for archival mboxes. Now we explicitly reject multi-message mboxes. For historical reasons, we retain support for single-message mboxes, but official deprecate this behavior.
* test: Test for ignoring multi-message mboxGravatar Austin Clements2012-11-26
| | | | | | This test is currently broken. Note that its brokenness cascades and causes the next test to fail as well (because notmuch incorrectly indexes the mbox file).
* test: Test notmuch new for single-message mboxGravatar Austin Clements2012-11-26
| | | | We support this for historical reasons.
* test: initial performance testing infrastructureGravatar David Bremner2012-11-26
| | | | | | | | This is not near as fancy as as the unit tests, on the theory that the code should typically be crashing when performance tuning. Nonetheless, there is plenty of room for improvement. Several more of the pieces of the test infrastructure (e.g. the option parsing) could be factored out into test/test-lib-common.sh
* test: factor out part of test-lib.sh into test-lib-common.shGravatar David Bremner2012-11-25
| | | | | The idea is to use some of the simpler parts of the test suite infrastructure to help run performance tests.
* notmuch-show.el: handle the case where icalendar-import-buffer returns nilGravatar Tomi Ollila2012-11-25
| | | | | | | | | | | icalendar-import-buffer can fail by an error signal (which have been witnessed) but according to its docstring it can also return nil when failing (it returns t when succeeding). Now that the error is caught by the caller of notmuch-show-inset-part-* functions in case icalendar-import-buffer returns nil an explicit error is signaled and unwind-protect takes care of deleting the temporary file (just in case, it is usually not written to the fs yet).
* notmuch-show.el: import calendar data with public function after CR removalGravatar Tomi Ollila2012-11-25
| | | | | | | | | | | notmuch-get-bodypart-content provides raw data to its caller so that it can be stored verbatim whenever needed. icalendar functions expect Emacs to do EOL conversion for the data given to these. Therefore it the CRLF -> LF conversion is now done explicitly. The calls to private functions icalendar--convert-ical-to-diary and icalendar--read-element are replaced with call to public function icalendar-import-buffer.
* test: always source test-lib.sh as ./test-lib.shGravatar Tomi Ollila2012-11-24
| | | | | | | | | | | There are currently 45 TESTS scripts. 36 of those load test-lib.sh using '. ./test-lib.sh' and 9 '. test-lib.sh'. In latter case test-lib.sh is first searched from directories in PATH (posix) and then from current directory (bash feature). Changed the 9 files to execute '. ./test-lib.sh'. The test-lib.sh should never be loaded from directory in PATH.
* test: Produce useful output when the HTML with images test failsGravatar Austin Clements2012-11-21
| | | | | | | Previously, this would simply indicate that the grep failed without any indication of the Emacs output it failed on. Now we take advantage of the test framework's handling of stdout to display the incorrect Emacs output if the test fails.
* contrib: notmuch-pick: add testsGravatar Mark Walters2012-11-19
| | | | | | The test should be run using the wrapper run-tests.sh. This links the tests into the normal notmuch TEST_DIRECTORY and runs them from there. After the test is complete then the links are removed.
* test: add nontrivial test for restore --accumulate.Gravatar David Bremner2012-11-17
| | | | | | | | | | It seems we have never tested the case that restore --accumulate actually adds tags. I noticed this when I started optimizing and no tests failed. The bracketing with "restore --input=dump.expected" are to make sure we start in a known state, and we leave the database in a known state for the next test.
* test: add more informative titles to restore --accumulate testsGravatar David Bremner2012-11-17
| | | | Thanks to Ethan for the suggestion.
* Fixed 2 misspellings of word 'separate'Gravatar Tomi Ollila2012-11-16
| | | | | | | "Seperate: The second most common misspelling on the Internet..." (from http://www.re-vision.com/spelling/separate.html). s/seperate/separate/ in debian/NEWS.Debian & test/README done.
* contrib: pick: bugfix when trying to show a non-messageGravatar Mark Walters2012-11-16
| | | | | | | | If the user pressed return on the end result status line it gave a blank message. Modify the function notmuch-pick-get-message-id to return nil rather than an empty message-id in this case to fix this. This also fixes a bug in the (lack of) quoting of the id string.
* Update notmuch-mutt requirements in README file.Gravatar Kevin J. McCarthy2012-11-16
| | | | | | | This updates the notmuch-mutt README file with requirements for the recently added duplicate removal patch. -Kevin
* notmuch-dump: tidy formattingGravatar David Bremner2012-11-16
| | | | More uncrustify at work.
* notmuch-restore: tidy formattingGravatar David Bremner2012-11-16
| | | | | | | | This is again the work of uncrustify. I remember there is some controversy about "! foo" versus "!foo", but in context I think "! foo" looks OK. Also, for functions "! foo (blah)" seems better than "!foo (blah)".
* notmuch-tag: tidy formattingGravatar David Bremner2012-11-16
| | | | This is just the result of running uncrustify.
* NEWS (for 0.15): Added note about Bcc & Reply-To headers in json outputGravatar Tomi Ollila2012-11-16
| | | | | | notmuch show --format json now includes Bcc and Reply-To headers of the message. Mention that in NEWS. (Heavily modified version of text originally from Michal Nazarewicz.)
* notmuch-restore: fix error message for extra positional parameter.Gravatar David Bremner2012-11-15
| | | | | Note that a single positional parameter will take this code path also, so the old message really makes no sense anymore.
* notmuch-restore: remove extra increment of optindGravatar David Bremner2012-11-15
| | | | This is left over from when the file name was a positional parameter.
* test: Fix HTML rendering testGravatar Austin Clements2012-11-15
| | | | | | | | | The test designed to exercise Emacs' rendering of HTML emails containing images inadvertently assumed w3m was available under Emacs 23. The real point of this test was to check that Emacs 24's shr renderer didn't crash when given img tags, so use shr if it's available, html2text otherwise (which is built in), and do only a simple sanity check of the result.
* emacs: Buttonize mid: linksGravatar Austin Clements2012-11-15
| | | | This adds support for RFC 2392 mid: message ID links.
* emacs: Improve the regexp used to match id:'s in messagesGravatar Austin Clements2012-11-15
| | | | | | | | | | | | | | | This regexp agrees with Xapian query syntax much more closely, though we specifically disallow various cases that would be confusing in the context of an email body (e.g., punctuation at the end of an id: link is not considered part of the id: link because it's probably part of the surrounding text). In particular, this handles id: links that are not surrounded by quotes much better, which stash is much more likely to generate now that we don't quote id's that don't need to be quoted. It also handles quoted id: links better. We update the buttonization test to reflect the new pattern.
* test: Test buttonization of id: linksGravatar Austin Clements2012-11-15
| | | | | | | This matches the current behavior of the buttonizer, so it passes, but many of these cases are not what you'd want (and some of them aren't even valid Xapian queries). The next patch will fix the handling of these cases and update the test.
* test: expand regex in test/basicGravatar David Bremner2012-11-10
| | | | | | | | | Over time, maintaining this very long regex has become irritating, especially when resolving conflicts. This patch replaces the call to sed with multiple extra arguments to find. Since each test binary is now on it's own line, this should make resolving conflicts easier.
* devel: Document schemata in STYLEGravatar Austin Clements2012-11-08
|
* show: More aggressively document the presence of devel/schemataGravatar Austin Clements2012-11-08
| | | | | | | Previously, the only mention of devel/schemata was a comment at the top of format_part_json, but the JSON output code is spread across several functions that are distributed across notmuch-show.c. Add references from the other three key JSON output functions.
* devel: Add Reply-to to the schemataGravatar Austin Clements2012-11-08
| | | | The code got out of sync with the documentation in 7d3c06dc.
* emacs/notmuch-show.el: handle bodypart insert errorGravatar Tomi Ollila2012-11-07
| | | | | | When inserting of email bodypart failes, insert a failure message to the buffer (and continue) instead of halting the insertion of the rest of that email thread in question.
* test: add test for showing Reply-To headersGravatar Peter Wang2012-11-07
| | | | | Test that show --format=json now outputs Reply-To header fields when present.
* show: include Reply-To header in json outputGravatar Peter Wang2012-11-07
| | | | | | | Output the Reply-To header field if present in a message. I want to be able to see what the sender intended in my mail client, before hitting the reply key. Only json output is changed, like the recently added Bcc field.
* uncrustify.cfg: added 3 new types for uncrustify to knowGravatar Tomi Ollila2012-11-07
| | | | | | | Added FILE, notmuch_show_params_t and sprinter_t to be types when uncrustifying sources. This affect spacing when uncrustify is deciding for type declaration instead of binary multiplication operation.
* test: add tests for date:since..until range queriesGravatar Jani Nikula2012-10-31
| | | | A brief initial test set.
* NEWS: date range search supportGravatar Jani Nikula2012-10-31
|
* man: document the date:since..until range queriesGravatar Jani Nikula2012-10-31
|
* lib: add date range query supportGravatar Jani Nikula2012-10-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a custom value range processor to enable date and time searches of the form date:since..until, where "since" and "until" are expressions understood by the previously added date/time parser, to restrict the results to messages within a particular time range (based on the Date: header). If "since" or "until" describes date/time at an accuracy of days or less, the values are rounded according to the accuracy, towards past for "since" and towards future for "until". For example, date:november..yesterday would match from the beginning of November until the end of yesterday. Expressions such as date:today..today means since the beginning of today until the end of today. Open-ended ranges are supported (since Xapian 1.2.1), i.e. you can specify date:..until or date:since.. to not limit the start or end date, respectively. CAVEATS: Xapian does not support spaces in range expressions. You can replace the spaces with '_', or (in most cases) '-', or (in some cases) leave the spaces out altogether. Entering date:expr without ".." (for example date:yesterday) will not work as you might expect. You can achieve the expected result by duplicating the expr both sides of ".." (for example date:yesterday..yesterday). Open-ended ranges won't work with pre-1.2.1 Xapian, but they don't produce an error either. Signed-off-by: Jani Nikula <jani@nikula.org>
* build: build parse-time-string as part of the notmuch lib and static cliGravatar Jani Nikula2012-10-31
|
* test: add smoke tests for the date/time parser moduleGravatar Jani Nikula2012-10-31
| | | | | | | | Test the date/time parser module directly, independent of notmuch, using the parse-time test tool. Credits to Michal Sojka <sojkam1@fel.cvut.cz> for writing most of the tests.