aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/emacs
Commit message (Collapse)AuthorAge
* 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.
* 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: 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: 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.
* | test: Updated expected output for new `notmuch-show-clean-address'.Gravatar David Edmondson2012-01-27
| |
* | 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.
* | Merge branch 'release'Gravatar David Bremner2012-01-13
|\| | | | | | | | | | | Conflicts: notmuch-reply.c notmuch.1
| * emacs: fix notmuch-show-indent-messages-width customization variable nameGravatar Jameson Graef Rollins2012-01-05
| | | | | | | | | | The name was originally notmuch-indent-messages-width, which is inconsistent with our variable naming convention.
* | test: Make generated message date a real dateGravatar Austin Clements2011-12-29
|/ | | | | | | | | January 5, 2001 was a Tuesday, not a Friday. Jameson fixed this exact problem for the multipart test in ec2b0a98cc, but not for generate_message itself. As Jameson pointed out in ec2b0a98cc, if we want to test date parsing, we should do it separately.
* test: add test for `notmuch-hello-refresh-hook'Gravatar Dmitry Kurochkin2011-12-22
| | | | | | | | Test that `notmuch-hello-refresh-hook' is called once when `notmuch-hello' is called and twice when calling `notmuch-hello-update' after that. The tests are very similar to tests for `notmuch-hello-mode-hook'.
* emacs: do not call `notmuch-hello-mode' on updateGravatar Dmitry Kurochkin2011-12-20
| | | | | | | | | | | `notmuch-hello' should call `notmuch-hello-mode' function only when run for the first time. But before the change, `notmuch-hello' used `kill-all-local-variables' to remove editable widgets fields. This caused the major mode to be reset, and `notmuch-hello-mode' to be called every time. The patch manually deletes all editable widget fields and removes `kill-all-local-variables' call.
* test: add broken test for `notmuch-hello-mode-hook' called during updateGravatar Dmitry Kurochkin2011-12-20
| | | | | Test that `notmuch-hello-mode-hook' is not called during `notmuch-hello' buffer updates. The test is currently broken.
* test: add test for `notmuch-hello-mode-hook'Gravatar Dmitry Kurochkin2011-12-20
| | | | | Test that `notmuch-hello-mode-hook' is called once when `notmuch-hello' function is called.
* Revert "test: add emacs test for hiding a message following an HTML part"Gravatar David Bremner2011-12-15
| | | | | | | | | | | This reverts commit c6a3a768fef9f59f483af04f4418d350efc27968. This test is unreliable, showing BROKEN in some environments and FIXED in others. The confusion seems to outweigh the benefits, for now. Conflicts: test/emacs
* emacs: do not call notmuch show for non-inlinable partsGravatar Dmitry Kurochkin2011-12-07
| | | | | | | | | | | | | | Before the change, there was a workaround to avoid notmuch show calls for parts with application/* Content-Type. But non-inlinable parts are not limited to this Content-Type (e.g. mp3 files have audio/mpeg Content-Type and are not inlinable). For such parts `notmuch-show-insert-part-*/*' handler is called which unconditionally fetches contents for all parts. The patch moves content fetching from `notmuch-show-insert-part-*/*' to `notmuch-show-mm-display-part-inline' function after MIME inlinable checks are done to avoid useless notmuch show calls. The application/* hack is no longer needed and removed.
* test: check that Emacs UI does not call notmuch for non-inlinable partsGravatar Dmitry Kurochkin2011-12-07
| | | | | | | | | | The patch adds two new test cases: * Do not call notmuch for non-inlinable application/mpeg parts * Do not call notmuch for non-inlinable audio/mpeg parts The application/mpeg test passes thanks to a workaround for application/* Content-Types. The audio/mpeg is currently broken.
* test: fix "Stashing in notmuch-search" test when emacs is not availableGravatar Dmitry Kurochkin2011-11-27
| | | | | | If emacs is not available, test_expect_equal would be called with only one argument. The patch fixes this by quoting the (possibly empty) $(cat OUTPUT) argument.
* emacs: test notmuch show with fourfold message indentationGravatar Gregor Zattler2011-11-25
| | | | | | | Previous behaviour was to indent messages in a thread according to depth by one space per level. This commit tests if setting notmuch-indent-messages-width to `4' provides a message thread with four spaces of indentation thread depth.
* emacs: test: notmuch show without indentationGravatar Gregor Zattler2011-11-25
| | | | | | | | | Previous behaviour was to indent messages in a thread according to depth by one space per level. In id:1311028119-50637-1-git-send-email-fgeller@gmail.com Felix Geller proposed a patch in order to turn indentation off. This commit tests if instead setting notmuch-indent-messages-width to `0' does turn off indentation.
* emacs: test notmuch-indent-messages-width defaultGravatar Gregor Zattler2011-11-25
| | | | | | | | Previous behaviour was to indent messages in a thread according to depth by one space per level. This is still the case with notmuch-indent-messages-width default value `1'. This test succeeds if output with default value is same as in "Basic notmuch-show view in emacs".
* test: emacs: tidy up "Stashing in notmuch-show" testGravatar Pieter Praet2011-11-18
| | | | | Merge expected output into the actual test, so we can verify the stashed filename using ${gen_msg_filename} instead of doing sed tricks.
* test: do not hide test_emacs errorsGravatar Dmitry Kurochkin2011-11-13
| | | | | | | | Do not redirect test_emacs stderr to /dev/null. Test_emacs uses emacsclient(1) now and it does not print unwanted messages (like those from `message') to stderr. But it does print useful errors, e.g. when emacs server connection fails, given expression is not valid or undefined function is called.
* test: stashing in notmuch-{show,search}Gravatar Pieter Praet2011-11-12
| | | | | | Should provide full test coverage of the stashing feature. Signed-off-by: Pieter Praet <pieter@praet.org>
* emacs: improve hidden signatures handling in notmuch-show-advance-and-archiveGravatar Dmitry Kurochkin2011-11-07
| | | | | | | Use `previous-single-char-property-change' instead of going through each character by hand and testing it's visibility. This fixes `notmuch-show-advance-and-archive' to work for the last message in thread with hidden signature.
* test: `notmuch-show-advance-and-archive' with invisible signatureGravatar Dmitry Kurochkin2011-11-07
| | | | | Add Emacs test to check that `notmuch-show-advance-and-archive' works for the last message in thread with invisible signature.
* test: add two emacs tests for show mode refreshGravatar Jameson Graef Rollins2011-10-09
| | | | | | | | | | | | | The first test tests that the notmuch-show-refresh-view function produces the exact same output for an unmodified show buffer. This test should pass since the relevant functionality has already been applied. The second test tests show refresh for a show buffer that has been modified by navigation and message visibility toggling. Ideally refresh-view should preserve this state of the notmuch-show buffer. Unfortunately it currently does not, so this test is know to be broken and is marked as such.
* test: add emacs test for hiding a message following an HTML partGravatar Dmitry Kurochkin2011-09-10
| | | | | | | | | | | | | | | | | | | | | | | | | Human-friendly scenario: * open a thread where a message which ends with an HTML part is followed by another message * make the first message visible * goto the beginning of the second message (first line, first colon) * hit "RET" Result: nothing happens except for "No URL at point" message Expected result: the second message is shown/hidden The root cause is that the HTML part has `keymap' text property set. In particular, "RET" is bound to visit a URL at point. The problem is that `keymap' property affects the next character following the region it is set to (see elisp manual [1]). Hence, the first character of the next message has a keymap inherited from the HTML part. [1] http://www.gnu.org/software/emacs/elisp/html_node/Special-Properties.html
* test: update documentation for test_emacs in test/READMEGravatar Dmitry Kurochkin2011-09-10
| | | | | | Update test_emacs documentation in test/README according to the latest changes in emacs tests. Move the note regarding setting variables from test/emacs to test/README.
* test: revert non-intentional changes introduced in eb4cf465Gravatar Pieter Praet2011-06-29
| | | | | | | | | | | | | | | | | | | | | | | eb4cf465 introduces changes which weren't part of the submitted patch (id:"87liwlip2j.fsf@gmail.com"), presumably made during resolving merge conflicts. The first one causes the title of a test to be printed a second time, in place of the correct title: PASS Message with .. in Message-Id: PASS Message with .. in Message-Id: instead of: PASS Message with .. in Message-Id: PASS Sending a message via (fake) SMTP The second one is simply the insertion of a line break, so no harm there. This commit reverts both changes, as they were clearly accidental. Signed-off-by: Pieter Praet <pieter@praet.org>
* test: use emacsclient(1) for Emacs testsGravatar Dmitry Kurochkin2011-06-28
| | | | | | | | | | | | | | | | | Before the change, every Emacs test ran in a separate Emacs instance. Starting Emacs many times wastes considerable time and it gets worse as the test suite grows. The patch solves this by using a single Emacs server and emacsclient(1) to run multiple tests. Emacs server is started on the first test_emacs call and stopped when test_done is called. We take care not to leave orphan Emacs processes behind when test is terminated by whatever reason: Emacs server runs a watchdog that periodically checks that the test is still running. Some tests need to provide user input. Before the change, this was done using echo(1) to Emacs stdin. This no longer works and instead `standard-input' variable is set accordingly to make `read' return the appropriate string.
* test:Improve test behaviors when --root is usedGravatar Mark Anderson2011-06-28
| | | | | | | | | | | Change add_email_corpus, emacs_deliver_message and tests to use $TEST_DIRECTORY instead of '..'. This improves the behavior of the usage of --root=<dir>, as the assumption of what '..' means will usually be incorrect. Document -root option in README and update valgrind to work with -root.
* test: set variables using `let' instead of `setq' in Emacs testsGravatar Dmitry Kurochkin2011-06-28
| | | | | | | | | Using `setq' for setting variables in Emacs tests affect other tests that may run in the same Emacs environment. Currently it works because each test is run in a separate Emacs instance. But in the future multiple tests will run in a single Emacs instance. The patch changes all variables to use `let', so the scope of the change is limited to a single test.
* test: use emacs_deliver_message in Emacs SMTP send testGravatar Dmitry Kurochkin2011-06-28
| | | | | Minor changes to expected results of other Emacs tests were needed because the message Date header changed.
* test: remove some sed(1) calls in Emacs testsGravatar Dmitry Kurochkin2011-06-28
| | | | | | | | Few Emacs tests used sed(1) to remove unexpected output in the beginning to avoid getting confused by messages such as "Parsing /home/cworth/.mailrc... done". This is no longer needed since tests are run in a temporary home directory instead of the user's one. So remove these sed(1) calls.
* test: save buffer content to file instead of printing it in Emacs testsGravatar Dmitry Kurochkin2011-06-28
| | | | | | | | | | | | | | | | | | | | | | Before the change, the common Emacs test scheme was to print buffer content to stdout and redirect it to a file or capture it in a shell variable. This does not work if we switch to using emacsclient(1) for running the tests, because you can not print to the stdout in this case. (Actually, you can print to stdout from Emacs server, but you can not capture the output on emacsclient(1)). The patch introduces new Emacs test auxiliary functions: `test-output' and `test-visible-output'. These functions are used to save buffer content to a file directly from Emacs. For most tests the changes are trivial, because Emacs stdout output was redirected to a file anyway. But some tests captured the output in a shell variable and compare it with the expected output using test_expect_equal. These tests are changed to use files and test_expect_equal_file instead. Note: even if we do not switch Emacs tests to emacsclient(1), the patch makes tests cleaner and is an improvement.
* test: wrap and indent test_emacs callsGravatar Dmitry Kurochkin2011-06-28
| | | | | | | Most test_emacs calls have long arguments that consist of many expressions. Putting them on a single line makes it hard to read and produces poor diff when they are changed. The patch puts every expression in test_emacs calls on a separate line.
* test: fix argument order of test_expect_equal_file in few testsGravatar Dmitry Kurochkin2011-06-28
| | | | | | Few Emacs tests had test_expect_equal_file arguments in the wrong order: the first argument should be the test output and the second one should be the expected.
* test: remove useless test_emacs call from an emacs FCC testGravatar Dmitry Kurochkin2011-06-23
| | | | | This was inadvertently left over when debugging an early version of this commit. -Carl Worth <cworth@cworth.org>
* test: Test emacs message composing with various values for notmuch-fcc-dirsGravatar Carl Worth2011-06-23
| | | | | | | We exercise each of the documented values (nil, a string, and a list). For the list, we test matching a specific entry, matching a catch-all regular expression, and no match at all (in which case there is no FCC set).
* test emacs: Add tests for hiding messages in notmuch-show viewGravatar Dmitry Kurochkin2011-06-15
| | | | | This test is expected to fail as it exposes a current bug, (which we hope to fix soon).
* test: Add test that emacs detects and hides top-post quotes of original messagesGravatar Carl Worth2011-06-10
| | | | | | | This tests the recently-added detection/hiding of top-posted quotations and in the testing, it takes advantage of the less-recently-added visible-buffer-string function for emitting only the visible text from a buffer.
* test: update emacs test to use test_expect_equal_fileGravatar Jameson Graef Rollins2011-06-03
| | | | | | | | | | This is a much cleaner way to do the emacs tests, since we're actually comparing output against existing files with expected output. We also won't miss any trailing newlines this way. And speaking of which, one of the expected output files was actually missing a trailing blank line that was actually in one of the original messages, so this was fixed.
* test: add "notmuch-show for message with invalid From" testGravatar Dmitry Kurochkin2011-06-03
|
* test: add test for saving attachments using notmuch-show-save-partGravatar Dmitry Kurochkin2011-05-31
| | | | | | | | Use .gz filenames for saved attachments in the tests to check that Emacs does not re-compress the file. Use test_expect_equal_file instead of test_expect_equal to avoid binary output on the console.