summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2012-03-11build: Require gmime >= 2.6.7Thomas Jost
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"
2012-02-29test: Remove 'broken' flag from encoding testMichal Sojka
2012-02-29test: Add test for searching of uncommonly encoded messagesMichal Sojka
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.
2012-02-25emacs: Reverse the meaning of notmuch-show-refresh-view's argumentAustin Clements
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.
2012-02-25emacs: add `notmuch-show-stash-mlarchive-link{, -and-go}'Pieter Praet
* 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"
2012-02-25test: emacs: expand subtest "Stashing in notmuch-show" wrt stashing Mailing List Archive URIsPieter Praet
`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.
2012-02-25test: replace occurrences of $PWD with vars that are more stablePieter Praet
Thanks to Dmitry Kurochkin <dmitry.kurochkin@gmail.com> for pointing this out: id:"87d39ymyb4.fsf@gmail.com"
2012-02-20test: always report missing prereqs, independent of `--verbose' optionPieter Praet
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.
2012-02-17add support for user-specified files & directories to ignoreTomi Ollila
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"
2012-02-17test: add tests wrt ignoring user-specified files and directoriesTomi Ollila
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.
2012-02-12show: Simplify new text formatter codeAustin Clements
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.
2012-02-12test: remove explicit loading of elisp tests in emacs-address-cleaningDmitry Kurochkin
It is no longer needed, since elisp tests files are auto loaded now.
2012-02-12test: auto load elisp tests file in test_emacs if availableDmitry Kurochkin
This allows us to simplify shell part of tests written in elisp.
2012-02-08test: fix emacs tests after tagging operations changesDmitry Kurochkin
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.
2012-02-04test: Fix up date in MML quoting tests.David Bremner
based on id:"1328264649-27346-3-git-send-email-pieter@praet.org" Commit 66ecd9063 made dates "real", but it hasn't hit release yet.
2012-02-04Merge commit '0.11.1'David Bremner
Conflicts: NEWS bindings/python/notmuch/database.py bindings/python/notmuch/message.py notmuch.1 NEWS merged by hand, others taken from master.
2012-02-04emacs: fix `notmuch-wash-region-to-button' to work at beginning of bufferDmitry Kurochkin
`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.
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-03emacs: More address cleaning.David Edmondson
Remove outer single-quotes from the mailbox part. Allow for multiple sets of nested single and double quotes. Add more tests.
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-02-03emacs: quote MML tags in repliesAaron Ecay
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.
2012-02-03test: add tests for quoting of MML tags in repliesAaron Ecay
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.
2012-01-27emacs: Another special case for `notmuch-show-clean-address'.David Edmondson
Remove backslashes.
2012-01-27test: Updated expected output for new `notmuch-show-clean-address'.David Edmondson
2012-01-27emacs: Avoid `mail-header-parse-address' in `notmuch-show-clean-address'.David Edmondson
`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.
2012-01-26test: `notmuch-test-run' should protect against buffer switching.David Edmondson
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.
2012-01-26test: `visible-buffer-substring' should not return text properties.David Edmondson
When using `visible-buffer-substring' to examine a buffer, the text properties are not useful, so don't include them.
2012-01-26emacs: polish notmuch-hello help textDmitry Kurochkin
Make `=' binding description consistent with others.
2012-01-25emacs: bind "s" to `notmuch-search' in notmuch-hello bufferDmitry Kurochkin
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.
2012-01-25test: Add address cleaning tests.David Edmondson
2012-01-25test: Add more helpers for emacs 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-25test: Don't return the result of checking for running emacs to the tester.David Edmondson
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).
2012-01-23config: only exclude messages if 'search.exclude_tags' is explicitly setPieter Praet
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"
2012-01-23test: only exclude "deleted" messages from search if explicitly configuredPieter Praet
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.
2012-01-23show: Use consistent header ordering in the text formatAustin Clements
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.
2012-01-23test/emacs-large-search-buffer: correct typo (EXPEXTED -> EXPECTED)Pieter Praet
introduced in commit 3b24b396
2012-01-22test: make (kill-emacs) from emacsclient work with emacs 23.(1|2)Tomi Ollila
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.
2012-01-22test: whitespace-cleanup for most test/* filesTomi Ollila
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.
2012-01-21Add compatibility with gmime 2.6Thomas Jost
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.
2012-01-21emacs: add invisible dot instead of space at the end of notmuch-hello search boxDmitry Kurochkin
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.
2012-01-21Document external dependencies in the test suiteEthan Glasser-Camp
Add an explicit note to the README explaining what programs are necessary and the perhaps-surprising behavior of skipping tests if they aren't present. Signed-off-by: Ethan Glasser-Camp <ethan@betacantrips.com>
2012-01-19Fix dependency generation for compat, test, and utilAustin Clements
This adds source files in compat, test, and util to SRCS so that the top-level Makefile.local will generate dependency files for them.
2012-01-16search: Support automatic tag exclusionsAustin Clements
This adds a "search" section to the config file and an "auto_tag_exclusions" setting in that section. The search and count commands pass tag tags from the configuration to the library.
2012-01-16cli: pick the user's address in a group list as from addressJani Nikula
Messages received to a group list were not replied to using the from address in the list. Fix it. Signed-off-by: Jani Nikula <jani@nikula.org>
2012-01-16test: add known broken test for reply from address in named group listJani Nikula
If a message was received to the user's address that was in a named group list, notmuch reply does not use that address for picking the from address. Groups lists are of the form: foo:bar@example.com,baz@example.com; Signed-off-by: Jani Nikula <jani@nikula.org>
2012-01-15test: don't bail out of `run_emacs' too early when missing prereqsPieter Praet
When running the Emacs tests in verbose mode, only the first missing prereq is reported because the `run_emacs' function is short-circuited early: #+begin_example emacs: Testing emacs interface missing prerequisites: [0] emacs(1) skipping test: [0] Basic notmuch-hello view in emacs SKIP [0] Basic notmuch-hello view in emacs #+end_example This can lead to situations reminiscent of "dependency hell", so instead of returning based on each individual `test_require_external_prereq's exit status, we now do so only after checking all the prereqs: #+begin_example emacs: Testing emacs interface missing prerequisites: [0] dtach(1) emacs(1) emacsclient(1) skipping test: [0] Basic notmuch-hello view in emacs SKIP [0] Basic notmuch-hello view in emacs #+end_example Also added missing prereq for dtach(1).
2012-01-14test: add tests for "notmuch reply" --reply-to=senderMark Walters
2012-01-13Merge branch 'release'David Bremner
Conflicts: notmuch-reply.c notmuch.1
2012-01-08python test "compare message ids"Patrick Totzke
Introduces a second (trivial) test for the python bindings that searches for message ids and compares the output with that of `notmuch search`.