aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
Commit message (Collapse)AuthorAge
* 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.
* | test: remove ".sh" extension from the recently added Emacs testsGravatar Dmitry Kurochkin2012-02-03
| | | | | | | | | | 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.
| * emacs: quote MML tags in repliesGravatar Aaron Ecay2012-02-03
| | | | | | | | | | | | | | | | | | Emacs message-mode uses certain text strings to indicate how to attach files to outgoing mail. If these are present in the text of an email, and a user is tricked into replying to the message, the user’s files could be exposed. Edited-by: Pieter Praet <pieter@praet.org>: Rebased to release branch.
| * test: add tests for quoting of MML tags in repliesGravatar Aaron Ecay2012-02-03
| | | | | | | | | | | | | | | | The test is broken at this time; the next commit will introduce a fix. Edited-by: Pieter Praet <pieter@praet.org>: Rebased to release branch, moved expected output into the actual test, and fixed "Fcc:" line.
* | emacs: Another special case for `notmuch-show-clean-address'.Gravatar David Edmondson2012-01-27
| | | | | | | | Remove backslashes.
* | test: Updated expected output for new `notmuch-show-clean-address'.Gravatar David Edmondson2012-01-27
| |
* | emacs: Avoid `mail-header-parse-address' in `notmuch-show-clean-address'.Gravatar David Edmondson2012-01-27
| | | | | | | | | | | | | | | | | | | | `mail-header-parse-address' expects un-decoded mailbox parts, which is not what we have at this point. Replace it with simple string deconstruction. Mark the corresponding test as no longer broken. Minor whitespace cleanup.
* | test: `notmuch-test-run' should protect against buffer switching.Gravatar David Edmondson2012-01-26
| | | | | | | | | | | | The body of the test may cause the current buffer to change. Ensure that the output goes to the correct buffer by switching back before inserting it.
* | test: `visible-buffer-substring' should not return text properties.Gravatar David Edmondson2012-01-26
| | | | | | | | | | When using `visible-buffer-substring' to examine a buffer, the text properties are not useful, so don't include them.
* | emacs: polish notmuch-hello help textGravatar Dmitry Kurochkin2012-01-26
| | | | | | | | Make `=' binding description consistent with others.
* | emacs: bind "s" to `notmuch-search' in notmuch-hello bufferGravatar Dmitry Kurochkin2012-01-25
| | | | | | | | | | | | Before the change, "s" in notmuch-hello buffer would jump to the search box. The patch changes the binding to `notmuch-search' which is consistent with all other notmuch buffers.
* | test: Add address cleaning tests.Gravatar David Edmondson2012-01-25
| |
* | test: Add more helpers for emacs tests.Gravatar David Edmondson2012-01-25
| |
* | test: Add `test_emacs_expect_t'.Gravatar David Edmondson2012-01-25
| | | | | | | | | | | | | | | | | | 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.
* | test: Don't return the result of checking for running emacs to the tester.Gravatar David Edmondson2012-01-25
| | | | | | | | | | | | | | | | When checking for a running emacs, test_emacs evaluates the empty list '()'. This returns 'nil' when emacs is running, which is then prepended to the actual test result. Given that it is not part of the actual test output the test harness can incorrectly report test failure (or success).
* | config: only exclude messages if 'search.exclude_tags' is explicitly setGravatar Pieter Praet2012-01-23
| | | | | | | | | | | | | | | | | | | | | | | | Currently, the 'search.exclude_tags' option is automatically set to "deleted;spam;" if it's missing from the config file. This violates the Principle of Least Surprise, so *only* set 'search.exclude_tags' to "deleted;spam;" if we didn't find a configuration file at all. This patch is actually Austin Clements' work: id:"20120117203211.GQ16740@mit.edu"
* | test: only exclude "deleted" messages from search if explicitly configuredGravatar Pieter Praet2012-01-23
| | | | | | | | | | | | | | | | | | Currently, the 'search.exclude_tags' option is automatically set to "deleted;spam;" if it's missing from the config file. This violates the Principle of Least Surprise, so update the tests to *only* expect the exclusion of messages which are tagged "deleted" if the 'search.exclude_tags' option is explicitly set *and* contains that tag.
* | show: Use consistent header ordering in the text formatGravatar Austin Clements2012-01-23
| | | | | | | | | | | | | | | | | | | | 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. Strangely, the raw format also uses this function, so this also fixes the two raw format tests affected by this change.
* | test/emacs-large-search-buffer: correct typo (EXPEXTED -> EXPECTED)Gravatar Pieter Praet2012-01-23
| | | | | | | | introduced in commit 3b24b396
* | test: make (kill-emacs) from emacsclient work with emacs 23.(1|2)Gravatar Tomi Ollila2012-01-22
| | | | | | | | | | | | | | emacsclient --eval '(kill-emacs)' makes emacs versions 23.1 and 23.2 ask user input from running emacs. Redefining yes-or-no-p function when kill-emacs is executed for these emacs versions in test-lib.el avoids this test problem.
* | test: whitespace-cleanup for most test/* filesGravatar Tomi Ollila2012-01-22
| | | | | | | | | | | | Used emacs (whitespace-cleanup) function to "cleanup blank problems" in test files where that could be done without breaking tests; test/emacs was partially, and test/multipart was fully reverted.
* | Add compatibility with gmime 2.6Gravatar Thomas Jost2012-01-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There are lots of API changes in gmime 2.6 crypto handling. By adding preprocessor directives, it is however possible to add gmime 2.6 compatibility while preserving compatibility with gmime 2.4 too. This is mostly based on id:"8762i8hrb9.fsf@bookbinder.fernseed.info". This was tested against both gmime 2.6.4 and 2.4.31. With gmime 2.4.31, the crypto tests all work fine (as expected). With gmime 2.6.4, one crypto test is currently broken (signature verification with signer key unavailable), most likely because of a bug in gmime which will hopefully be fixed in a future version.
* | emacs: add invisible dot instead of space at the end of notmuch-hello search boxGravatar Dmitry Kurochkin2012-01-21
| | | | | | | | | | | | | | | | | | | | This makes `show-trailing-whitespace' happy, i.e. it does not mark the whole search box line as trailing spaces. Since the dot is invisible, this change makes no visible difference for `notmuch-hello'. Edited-by: Pieter Praet <pieter@praet.org> to fix the tests.