aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/emacs
Commit message (Collapse)AuthorAge
...
* 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.
* test: use `princ' instead of `message' calls in emacs testsGravatar Dmitry Kurochkin2011-05-27
| | | | | | | | | | | | | | | | The patch replaces all (message (buffer-string)) calls in emacs tests with (princ (buffer-string)). This avoids accidentally interpreting '%' as format specifiers and makes code simpler because we do not need to capture stderr. Also, the patch works around an Emacs (23.3+1-1 on current Debian Unstable) segfault in "Ensure that emacs doesn't drop results" test. Note: the segfault does not happen on every test run. Though, it seems to be consistently reproducible if the test uses 300 messages instead of 30. Hopefully, it is the crash described in Emacs bug #8545 [1] which is already fixed. [1] http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8545
* test: change "#!/bin/bash" to "#!/usr/bin/env bash" enhances portabilityGravatar Joel Borggrén-Franck2011-05-27
| | | | | | Change #!/bin/bash at start of tests to "#!/usr/bin/env bash". That way systems running on bash < 4 can prepend bash >= 4 to path before running the tests.
* test: add test for hiding/showing signature in notmuch-show viewGravatar Dmitry Kurochkin2011-05-24
|
* Update test suite for 7 tests that were recently fixed.Gravatar Carl Worth2010-12-07
| | | | | These tests had been broken, but were fixed by the preceding commit, so update the test suite to print PASS rather than FIXED for these.
* Make author order tests more strict.Gravatar Austin Clements2010-12-07
| | | | | | | | | | | | Use varying dates in the test messages to test the order authors are listed in. Add tests with repeated author names and unusual date ordering. Most of these are broken at the moment, but will be fixed shortly. Edited-by: Carl Worth <cworth@cworth.org>: Also update the expected results for existing emacs tests that currently codify the incorrect author ordering, (and similarly note them as broken in the current test suite).
* test: Fix emacs FCC test to account for new maildir synchronizationGravatar Carl Worth2010-11-11
| | | | | | The FCC code saves a message in maildir format, and sets the S flag by default, so now, automatically, FCC messages will not show up as "unread", (which seems natural enough).
* test: Add test for viewing raw message within emacs.Gravatar Carl Worth2010-11-06
| | | | | This provides further coverage for the recently added (and recently modified) use of "notmuch show --format=raw" within emacs.
* test: Add test for saving an attachment from emacsGravatar Carl Worth2010-11-06
| | | | | This tests the use of "notmuch cat" recently added to the emacs interface.
* test: Don't mess with user's HOME directoryGravatar Carl Worth2010-11-05
| | | | | | | | | | This was too rude of a thing to do and could easily introduce problems, (as reported by Rob Browning whose environment required some HOME-specific things for shell startup). Instead, implement more focused changes to ensure that particular file in $HOME don't cause problems. Specifically, we fix known problems with ~/.signature and ~/.mailrc here.
* test: Clear the "BROKEN" flag on an existing emacs testGravatar Carl Worth2010-11-05
| | | | | | | | | | | I still don't know everything about how I want search order to be customizable, but I do like the current defaults, (namely, performing a new search gives results newest first, but performing a saved search like "tag:inbox" gives results as oldest first). Until we come up with a better plan for people to select what *they* want, (rather than just getting what I want), let's codify the current results in the test suite.
* test: Test emacs notmuch-hello with no saved searches to display.Gravatar Carl Worth2010-10-29
| | | | Haippily, this works just fine, but we might as well test that.
* test: Test emacs notmuch-hello when displaying a saved search with 0 results.Gravatar Carl Worth2010-10-29
| | | | This test verifies that the bug fix in the previous commit is working.
* test: Avoid using unreliable, hard-coded thread ID values in test suite.Gravatar Carl Worth2010-10-28
| | | | | | | | | | Some recently-added tests used hard-coded thread ID values in search specifications. This is unreliable since the thread IDs depend on the order in which "notmuch new" encounters new files, (which in turn can depend on inode ordering within the filesystem). Fix these by using the new "notmuch search --output=threads" to find the correct thread IDs given a hard-coded (but reliable) message ID.
* test: Add test for reply functionality within emacs.Gravatar Carl Worth2010-10-27
| | | | | | The reply is primarily taken care of by "notmuch reply" which is already thoroughly tested. But a recent bug is inserting a duplicate From header in the emacs-based reply. So exercise that bug here.
* test: Add test for fully-roundtripped FCCGravatar Carl Worth2010-10-27
| | | | | | We test that the message we sent via (fake) SMTP is included in the mail index after a "notmuch new". This verifies that the FCC setting indeed successfully saved the sent message within the notmuch mail store.
* test: Use an explicit date in the message sent via (fake) SMTPGravatar Carl Worth2010-10-27
| | | | | | Simply setting an explicit date is cleaner than letting the current, (arbitrary), date get generated for the email message and then constantly filtering that date out of search results.
* emacs: Explicitly set the From address when composing a new message.Gravatar Carl Worth2010-10-27
| | | | | Previously, underlying emacs code was setting this header. Now, we do the right thing and query the notmuch configuration for the default value here.
* emacs: Enable FCC (to a directory named "sent") by default.Gravatar Carl Worth2010-10-27
| | | | | | Now that the FCC code is fixed to use the notmuch database path, we can actually enable this by default, which should be highly useful for all new users of notmuch.
* TODO: Note idea for a new "notmuch compose"Gravatar Carl Worth2010-10-27
| | | | | | Which would also allow the recently added test of sending an email message with the emacs interface to be a little more honest about the From address.
* test: Add test that emacs interface actually sends mail.Gravatar Carl Worth2010-10-27
| | | | | | | | | Rather than *reall* sending mail here, we instead have a new test program, smtp-dummy which implements (a small piece of) the server-side SMTP protocol and saves a mail message to the filename provided. This gives us reasonable test coverage of a large chunk of the notmuch+emacs code base (down to talking to an SMTP server with the final mail contents).