aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/emacs
Commit message (Collapse)AuthorAge
...
* 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).
* emacs: Fix quoting of Message-Id to fix test case of Id containing ".."Gravatar Carl Worth2010-10-22
| | | | | | If Xapian sees unquoted ".." as in id:123..456 then it thinks that's a range specification. We avoid this problem by instead passing id:"123..456" to Xapian.
* test: Add test demonstrating failure in emacs interface when Message-Id has ..Gravatar Carl Worth2010-10-22
| | | | | Thanks to Jameson Rollins for pointing out this bug (id:87y6g7zr6q.fsf@servo.finestructure.net).
* test: Add tests for adding/removing tags within emacs interfaceGravatar Carl Worth2010-10-22
| | | | Exercising both the notmuch-search and notmuch-show views.
* test: Add simple tests for navigating notmuch-hello and notmuch-search viewsGravatar Carl Worth2010-10-22
| | | | | | | | | | | | | | | | | We simulate the act of selecting the "inbox" saved search from notmuch-hello and the act of selecting a desired thread from the notmuch-search results. The test for the navigation of notmuch-hello is currently marked as BROKEN since its output is in the opposite order compared to the '(notmuch-search "tag:inbox")' test. This question of ordering is a currently open issue on the notmuch mailing list, so we'll let the test suite reflect that for now. Finally, this commit also abstracts some common emacs lisp code, (waiting for the current buffer's process to complete), into a new notmuch-test-wait function that is made available to anything calling test_emacs.
* test: Add tests for emacs notmuch-search and notmuch-show functions.Gravatar Carl Worth2010-10-22
| | | | | Moving the expected output into individual files (rather than inline) to keep the test script much easier to read.
* emacs: Remove the joke from the first line of the notmuch-hello view.Gravatar Carl Worth2010-10-22
| | | | Overuse just makes the joke unfunny.
* test: Add the most rudimentary testing of the emacs interface.Gravatar Carl Worth2010-10-22
So far, this is doing nothing more than adding a corpus of email and ensuring that the `notmuch-hello' function produces the desired output.