aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
Commit message (Collapse)AuthorAge
* emacs: get rid of trailing spaces in notmuch-hello viewGravatar Dmitry Kurochkin2012-04-12
| | | | | | | | | | | This patch removes trailing spaces in notmuch-hello view. A side effect of this change is that tag/query buttons no longer include a space at the end. This means that pressing RET when the point is at the first character after the tag/query button no longer works (note that this is the standard behavior for buttons). We may change this behavior in the future (without adding trailing spaces back) if people would find this change inconvenient.
* test: add some exclude testsGravatar Mark Walters2012-04-07
| | | | | | | | 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.
* cli: move count to the new --exclude=(true|false|flag) naming scheme.Gravatar Mark Walters2012-04-07
| | | | | | | Move the option --no-exclude to the --exclude= scheme. Since there is no way to flag messages only true and false are implemented. Note that, for consistency with other commands, this is implemented as a keyword option rather than a boolean option.
* emacs: fix off-by-one error in notmuch-hello column alignmentGravatar Dmitry Kurochkin2012-04-05
| | | | | Expected results for few tests are fixed, the relevant test is unmarked broken.
* test: add broken test for long names in Emacs notmuch-hello viewGravatar Dmitry Kurochkin2012-04-05
| | | | | Currently, the column alignment in Emacs notmuch-hello is broken for tags/queries with long names.
* emacs: Fix the References header in replyGravatar Adam Wolfe Gordon2012-04-02
| | | | | | | | | | | | | | In the new reply code, the References header gets inserted by message.el using a function called message-shorten-references. Unlike all the other header-inserting functions, it doesn't put a newline after the header, causing the next header to end up on the same line. In our case, this header happened to be User-Agent, so it's hard to notice. This is probably a bug in message.el, but we need to work around it. This fixes the problem by wrapping message-shorten-references in a function that inserts a newline after if necessary. This should protect against the message.el bug being fixed in the future.
* test: Show all headers in emacs reply testsGravatar Adam Wolfe Gordon2012-04-02
| | | | | | | | | | | | | | By default, emacs hides the User-Agent and References headers when composing mail. This is a good thing for users, but a bad thing for testing, since we can create ugly or invalid headers and not have it show up in the tests. By setting message-hidden-headers to an empty list, we force emacs to show all the headers, so we can check that they're correct. Users won't see this, but it will let us catch future bugs. As a side-effect, this breaks all the reply tests, since there is a bug with the References and User-Agent headers, fixed in the next commit.
* emacs: Fix two bugs in replyGravatar Adam Wolfe Gordon2012-04-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug 1: Replying from alternate addresses ---------------------------------------- The reply code was inconsistent in its use of symbols and strings for header names being passed to message.el functions. This caused the From header to be lookup up incorrectly, causing an additional From header to be added with the user's primary address instead of the correct alternate address. This is fixed by using symbols everywhere, i.e. never using strings for header names when interacting with message.el. This change also removes our use of `mail-header`, since we don't use it anywhere else, and using assq makes it clear how the header lists are expected to work. Bug 2: Duplicate headers in emacs 23.2 -------------------------------------- The message.el code in emacs 23.2 assumes that header names will always be passed as symbols, so our use of strings caused problems. The symptom was that on 23.2 (and presumably on earlier versions) the reply message would end up with two of some headers. Converting everything to symbols also fixes this issue.
* test: Tests for reply from alternate addresses in emacsGravatar Adam Wolfe Gordon2012-04-02
| | | | | | | | | | Since the recent reply changes were pushed, there has been a bug that causes emacs to always reply from the primary address, even if the JSON or default CLI reply output uses an alternate address. This adds two tests to the emacs test library based on the two "Reply form..." tests in the reply test library. One is currently marked broken.
* emacs: Escape all message ID queriesGravatar Austin Clements2012-03-30
| | | | | | | | | | This adds a lib function to turn a message ID into a properly escaped message ID query and uses this function wherever we previously hand-constructed ID queries. Wherever this new function is used, documentation has been clarified to refer to "id: queries" instead of "message IDs". This fixes the broken test introduced by the previous patch.
* test: Add Emacs test for messages with quotes in their message IDGravatar Austin Clements2012-03-30
| | | | | Currently this is broken because Emacs doesn't properly escape double quotes in message IDs.
* cli: refactor "notmuch tag" data structures for tagging operationsGravatar Jani Nikula2012-03-30
| | | | | | | | | | | | | | To simplify code, keep all tagging operations in a single array instead of separate add and remove arrays. Apply tag changes in the order specified on the command line, instead of first removing and then adding the tags. This results in a minor functional change: If a tag is both added and removed, the last specified operation is now used. Previously the tag was always added. Change the relevant test to reflect the new behaviour. Signed-off-by: Jani Nikula <jani@nikula.org>
* test: add test for both adding and removing a tag at the same timeGravatar Jani Nikula2012-03-30
| | | | | | | The current behaviour is that regardless of the order in which the addition and removal of a tag are specified, the tag is added. Signed-off-by: Jani Nikula <jani@nikula.org>
* emacs: Use the new JSON reply format and message-cite-originalGravatar Adam Wolfe Gordon2012-03-19
| | | | | | | | | | | | | | | | | Use the new JSON reply format to create replies in emacs. Quote HTML parts nicely by using mm-display-part to turn them into displayable text, then quoting them with message-cite-original. This is very useful for users who regularly receive HTML-only email. Use message-mode's message-cite-original function to create the quoted body for reply messages. In order to make this act like the existing notmuch defaults, you will need to set the following in your emacs configuration: message-citation-line-format "On %a, %d %b %Y, %f wrote:" message-citation-line-function 'message-insert-formatted-citation-line The tests have been updated to reflect the (ugly) emacs default.
* test: Add broken tests for new emacs reply functionalityGravatar Adam Wolfe Gordon2012-03-19
| | | | | Add tests for creating nice replies to multipart messages, including those with HTML parts. These tests are expected to fail for now.
* reply: Add a JSON reply format.Gravatar Adam Wolfe Gordon2012-03-19
| | | | | | | | This new JSON format for replies includes headers generated for a reply message as well as the headers of the original message. Using this data, a client can intelligently create a reply. For example, the emacs client will be able to create replies with quoted HTML parts by parsing the HTML parts.
* test: Add broken test for the new JSON reply format.Gravatar Adam Wolfe Gordon2012-03-19
|
* test: add tests for message only searchGravatar Mark Walters2012-03-18
| | | | | | | This adds three tests for --output=messages searches. One test is for the case when one exclude tag does not occur in the Xapian database. This triggers a Xapian bug in some cases and causes the whole exclusion to fail. The next commit avoids this bug.
* test: the test for the exclude code mistakenly excludes the tag "="Gravatar Mark Walters2012-03-18
| | | | | | | The tests for the exclude code in search and count use the line notmuch config set search.exclude_tags = deleted which actually sets the exclude tags to be "=" and "deleted". Remove the "=" from this line.
* test: use subtest name for generated message subject by defaultGravatar Dmitry Kurochkin2012-03-18
| | | | | | | | | | | | | | | | | | Before the change, messages generated by generate_message() used "Test message #N" for default subject where N is the generated messages counter. Since message subject is commonly present in expected results, there is a chance of breaking other tests when a new generate_message() call is added. The patch changes default subject value for generated messages to subtest name if it is available. If subtest name is not available (i.e. message is generated during test initialization), the old default value is used (in this case it is fine to have the counter in the subject). Another benefit of this change is a sane default value for subject in generated messages, which would allow to simplify code like: test_begin_subtest "test for a cool feature" add_message [subject]="message for test for a cool feature"
* test: remove "Generate some messages" test from rawGravatar Dmitry Kurochkin2012-03-18
| | | | | | | | | | | | | | | Before the change, the first subtest in raw format tests just generated messages and checked that they are added successfully. This is not really a raw format test, it is creating of environment required for other subtests to run. The patch removes the first subtest from raw and replaces it with bare add_message calls, similar to how it is done in other tests. TODO: we should check that test environment was created successfully. Currently, many tests do add_message(), notmuch new and other calls without checking the results. We should come up with a general solution for this, i.e. if any command during test initialization fails, all tests should be skipped with appropriate error message.
* show: Convert raw format to the new self-recursive style, properly support ↵Gravatar Austin Clements2012-03-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | interior parts This is fully compatible for root and leaf parts, but now has proper support for interior parts. This requires some design decisions that were guided by what I would want if I were to save a part. Specifically: - Leaf parts are printed without headers and with transfer decoding. This is what makes sense for saving attachments. (Furthermore, the transfer decoding is necessary since, without the headers, the caller would not be able to interpret non-transfer-decoded output.) - Message parts are printed with their message headers, but without enclosing part headers. This is what makes sense for saving a message as a whole (which is a message part) and for saving attached messages. This is symmetric for whole messages and for attached messages, though we special-case the whole message for performance reasons (and corner-case correctness reasons: given malformed input, GMime may not be able to reproduce it from the parsed representation). - Multipart parts are printed with their headers and all child parts. It's not clear what the best thing to do for multipart is, but this was the most natural to implement and can be justified because such parts can't be interpreted without their headers. As an added benefit, we can move the special-case code for part 0 into the raw formatter.
* test: Fix malformed multipart messageGravatar Austin Clements2012-03-18
| | | | | | | | | | | | | | | | | | | | | | | Previously, there was only one CRLF between the terminating boundary of the embedded multipart/alternative and the boundary of the containing multipart. However, according the RFC 1341, 7.2.1: The boundary must be followed immediately either by another CRLF and the header fields for the next part, or by two CRLFs, in which case there are no header fields for the next part and The CRLF preceding the encapsulation line is considered part of the boundary so that it is possible to have a part that does not end with a CRLF (line break). Thus, there must be *two* CRLFs between these boundaries: one that ends the terminating boundary and one that begins the enclosing boundary. While GMime accepted the message we had before, it could not produce such a message.
* test: Fix typo in test descriptionGravatar Austin Clements2012-03-18
| | | | Part 4 is a multipart, not an html part.
* Merge branch 'release'Gravatar David Bremner2012-03-13
|\
| * build: Require gmime >= 2.6.7Gravatar Thomas Jost2012-03-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gmime-2.6 had a bug [1] which made it impossible to tell why a signature verification failed when the signer key was unavailable (empty "sigstatus" field in the JSON output). Since 00b5623d the corresponding test is marked as broken when using gmime-2.6 (2.4 is fine). This bug has been fixed in gmime 2.6.5, which is now the minimal gmime-2.6 version required for building notmuch (gmime-2.4 is still available). As a consequence the version check in test/crypto can be removed. [Added by db] Although less unambigously a bug, Gmime 2.6 prior to 2.6.7 also was more strict about parsing, and rejected messages with initial "From " headers. This restriction is relaxed in [2]. For reasons explained in [3], we want to keep this more relaxed parsing for now. [1] https://bugzilla.gnome.org/show_bug.cgi?id=668085 [2] http://git.gnome.org/browse/gmime/commit/?id=d311f576baf750476e06e9a1367a2dc1793ea7eb [3] id:"1331385931-1610-1-git-send-email-david@tethera.net"
* | test: update tests to reflect the exclude flagGravatar Mark Walters2012-03-02
| | | | | | | | | | | | | | notmuch show outputs the exclude flag so many tests using notmuch show failed. This commit adds "excluded:0" or "excluded: false" to the expected outputs. After this commit there should be no failing tests.
* | test: update search test to reflect exclude flagGravatar Mark Walters2012-03-02
| | | | | | | | | | | | notmuch-search.c now returns all matching threads even if it the match is a search.tag_excluded message (but with a mark indicating this). Update the test to reflect this.
* | test: add tests for new cli --no-exclude optionGravatar Mark Walters2012-03-02
| | | | | | | | | | | | The tests test the new --no-exclude option to search and count. There were no existing tests for the exclude behaviour for count so added these too.
* | show: Unify JSON header output for messages and message partsGravatar Austin Clements2012-03-01
| | | | | | | | | | | | | | | | | | This has three ramifications: - Blank To and Cc headers are no longer output for messages. - Dates are now canonicalized for messages, which means they always have a day of the week and GMT is printed +0000 (never -0000) - Invalid From message headers are handled slightly differently, since they get parsed by GMime now instead of notmuch.
* | show: Use consistent header ordering in the JSON formatGravatar Austin Clements2012-03-01
| | | | | | | | | | | | | | Previously, top-level message headers were printed as Subject, From, To, Date, while embedded message headers were printed From, To, Subject, Date. This makes both cases use the former order and updates the tests accordingly.
* | emacs: Tests for user-defined sectionsGravatar Daniel Schoepe2012-03-01
|/ | | | A new file was added for notmuch-hello tests.
* test: Remove 'broken' flag from encoding testGravatar Michal Sojka2012-02-29
|
* test: Add test for searching of uncommonly encoded messagesGravatar Michal Sojka2012-02-29
| | | | | | Emails that are encoded differently than as ASCII or UTF-8 are not indexed properly by notmuch. It is not possible to search for non-ASCII words within those messages.
* emacs: Reverse the meaning of notmuch-show-refresh-view's argumentGravatar Austin Clements2012-02-25
| | | | | | | | Consensus seems to be that people prefer that refreshing show buffers retains state by default, rather than resetting it by default. This turns out to be the case in the code, as well. In fact, there's even a test for this that's been marked broken for several months, which this patch finally gets to mark as fixed.
* emacs: add `notmuch-show-stash-mlarchive-link{, -and-go}'Gravatar Pieter Praet2012-02-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * emacs/notmuch-show.el (notmuch-show-stash-mlarchive-link-alist): New defcustom of type `alist' (key = name, value = URI), containing Mailing List Archive URI's for searching by Message-Id. (notmuch-show-stash-mlarchive-link-default): New defcustom, default MLA to use when `notmuch-show-stash-mlarchive-link' received no user input whatsoever. Available choices are generated using the contents of `notmuch-show-stash-mlarchive-link-alist'. (notmuch-show-stash-map): Added keybinds "l" and "L" for `notmuch-show-stash-mlarchive-link' respectively `notmuch-show-stash-mlarchive-link-and-go'. (notmuch-show-stash-mlarchive-link): New function, stashes a URI pointing to the current message at one of the MLAs configured in `notmuch-show-stash-mlarchive-link-alist'. Prompts user with `completing-read' if not provided with an MLA key. (notmuch-show-stash-mlarchive-link-and-go): New function, uses `notmuch-show-stash-mlarchive-link' to stash a URI, and then visits it using the browser configured in `browse-url-browser-function'. Based on original work [1] by David Edmondson <dme@dme.org>. [1] id:"1327397873-20596-1-git-send-email-dme@dme.org"
* test: emacs: expand subtest "Stashing in notmuch-show" wrt stashing Mailing ↵Gravatar Pieter Praet2012-02-25
| | | | | | | | | List Archive URIs `notmuch-show-stash-mlarchive-link' stashes a URI pointing to the current message at one of the MLAs configured in `notmuch-show-stash-mlarchive-link-alist'. Marked as "broken": fixed in next commit.
* test: replace occurrences of $PWD with vars that are more stableGravatar Pieter Praet2012-02-25
| | | | | Thanks to Dmitry Kurochkin <dmitry.kurochkin@gmail.com> for pointing this out: id:"87d39ymyb4.fsf@gmail.com"
* test: always report missing prereqs, independent of `--verbose' optionGravatar Pieter Praet2012-02-20
| | | | | | When tests are skipped due to missing prereqs, those prereqs are only displayed when running with the `--verbose' option. This is essential information when troubleshooting, so always send to stdout.
* add support for user-specified files & directories to ignoreGravatar Tomi Ollila2012-02-17
| | | | | | | | | A new configuration key 'new.ignore' is used to determine which files and directories user wants not to be scanned as new mails. Mark the corresponding test as no longer broken. This work merges my previous attempts and Andreas Amann's work in id:"ylp7hi23mw8.fsf@tyndall.ie"
* test: add tests wrt ignoring user-specified files and directoriesGravatar Tomi Ollila2012-02-17
| | | | | | | Files and directories which are specified in 'new.ignore' in the config file shouldn't be indexed nor reported by `notmuch new'. This is basically Pieter's work with Austin's comments addressed.
* show: Simplify new text formatter codeGravatar Austin Clements2012-02-12
| | | | | | | | | | | This makes the text formatter take advantage of the new code structure. The previously duplicated header logic is now unified, several things that we used to compute repeatedly across different callbacks are now computed once, and the code is simpler overall and 32% shorter. Unifying the header logic causes this to format some dates slightly differently, so the two affected test cases are updated.
* test: remove explicit loading of elisp tests in emacs-address-cleaningGravatar Dmitry Kurochkin2012-02-12
| | | | It is no longer needed, since elisp tests files are auto loaded now.
* test: auto load elisp tests file in test_emacs if availableGravatar Dmitry Kurochkin2012-02-12
| | | | This allows us to simplify shell part of tests written in elisp.
* test: fix emacs tests after tagging operations changesGravatar Dmitry Kurochkin2012-02-08
| | | | | | After the recent tagging operations changes, functions bound to "+" and "-" in notmuch-search and notmuch-show views always read input from the minibuffer. Use kbd macros instead of calling them directly.
* test: Fix up date in MML quoting tests.Gravatar David Bremner2012-02-04
| | | | | | based on id:"1328264649-27346-3-git-send-email-pieter@praet.org" Commit 66ecd9063 made dates "real", but it hasn't hit release yet.
* Merge commit '0.11.1'Gravatar David Bremner2012-02-04
|\ | | | | | | | | | | | | | | | | | | Conflicts: NEWS bindings/python/notmuch/database.py bindings/python/notmuch/message.py notmuch.1 NEWS merged by hand, others taken from master.
* | emacs: fix `notmuch-wash-region-to-button' to work at beginning of bufferGravatar Dmitry Kurochkin2012-02-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `Notmuch-wash-region-to-button' is the function that creates hidden regions with buttons for signatures, citations and original messages. Before the change, it did not work correctly if the to-be-hidden region started at the beginning of a message: the visibility toggle button was hidden as well. The patch fixes this. There are two parts in the fix: * Use `insert-before-markers' instead of `insert' for creating the button, so that it does not get added to the hidden overlay. * Stop using PREFIX argument for adding a newline before the button. The newline should not be added before a button at the beginning of buffer. The corresponding test is fixed now.
* | test: add test for hiding Original Message region at beginning of a messageGravatar Dmitry Kurochkin2012-02-04
| | | | | | | | | | | | | | | | | | | | 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"
* | emacs: More address cleaning.Gravatar David Edmondson2012-02-03
| | | | | | | | | | | | | | Remove outer single-quotes from the mailbox part. Allow for multiple sets of nested single and double quotes. Add more tests.