aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/emacs-large-search-buffer
Commit message (Collapse)AuthorAge
* test/emacs-large-search-buffer: correct typo (EXPEXTED -> EXPECTED)Gravatar Pieter Praet2012-01-23
| | | | introduced in commit 3b24b396
* 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: 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
* Update some more recent tests to use /usr/bin/env to find bashGravatar Carl Worth2011-05-27
| | | | | The recentl-applied patch had grown stale, so update the tests that had been created since it was originally written.
* emacs: Don't drop error messages from "notmuch search"Gravatar Carl Worth2011-03-10
| | | | | | | | | | | | | With the previous commit, unexpected output before or between search results would be displayed. However, trailing junk from the "notmuch search" output would still be silently swallowed. The most common case for an error message from "notmuch search" would be an invalid command-line, and in that case, there would be no search results and the trailing error message would get swallowed. We fix the process sentinel to check for leftover data and add it to the final buffer. We also add a test case to ensure this works.
* emacs: Display any unexpected output from notmuch searchGravatar Carl Worth2011-03-10
| | | | | | | | | | | | | | Rather than silently swallowing unexpected output, the emacs interface will now display it. This will allow error messages to actually arrive at the emacs interface (though not in an especially pretty way). This also allows for easier investigation of the inadvertent swallowing of search results that span page boundaries (as demonstrated by the recent added emacs-large-search-buffer test). The page-boundary bug has been present since a commit from 2009-11-24: 93af7b574598637c2766dd1f8ef343962c9a8efb Many thanks to Thomas Schwinge for tracking that bug down and contributing the test for it.
* Rename/rewrite the new emacs-forgetfulness test (to emacs-large-search-buffer)Gravatar Carl Worth2011-03-10
The new name is more descriptive of the bug being tested. Also, the test is rewritten slightly so that it's much more plain to see how the bug manifests itself, (that messages are droped from the emacs result at regular intervals). Primarily, this is by collapsing the large blobs used to inflate the message subjects.