summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2011-12-05test/python: set LD_LIBRARY_PATH and PYTHONPATH to use local notmuchdebian/0.10.2-10.10.2David Bremner
Possibly this should be factored out into some kind of "run_python" function.
2011-12-05test: add tests for python bindingsDavid Bremner
We start modestly, with a (slightly modified) test case from Kazuo Teramoto. Originally it just made sure the bindings didn't crash; here we check that by comparing the output with that of notmuch search.
2011-11-25test: add simple tests for online helpdebian/0.10.1-10.10.1David Bremner
Nothing fancy, but we can at least detect segmentation faults.
2011-11-17test: create dtach's session socket in $TEST_TMPDIRTomi Ollila
Due to 108-character limit in unix domain socket path this change is required; it is more probable that length of ${TMPDIR:-/tmp} is shorter than length of path to the current directory of notmuch test source directory. One can expect to create reasonable-length unix domain sockets wherever $TMPDIR points to.
2011-11-17test: create TEST_TMPDIR for holding temporary filesTomi Ollila
The TEST_TMPDIR if first needed to hold dtach's socket (due to 108-character limit in socket file names). Later it can be used to hold other temporary files; directory deleted at exit.
2011-11-15test: add tests for notmuch search --offset and --limitJani Nikula
Signed-off-by: Jani Nikula <jani@nikula.org>
2011-11-15test: add tests for notmuch countJani Nikula
Signed-off-by: Jani Nikula <jani@nikula.org>
2011-11-14test: Add a test script for "notmuch tag"Austin Clements
2011-11-14test/atomicity: change shebang to '#!/usr/bin/env bash'Tomi Ollila
2011-11-13test: make smtp-dummy work with Emacs 24Thomas Jost
In Emacs 24, a space is expected after a SMTP response code. If we don't respect that, smtpmail-send-it will wait forever.
2011-11-13test: do not hide test_emacs errorsDmitry Kurochkin
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.
2011-11-12exec emacs at the end of run_emacs scriptTomi Ollila
In the last line of run_emacs, exec the emacs process. With one fork less the process list is (also) neater.
2011-11-12test: stashing in notmuch-{show,search}Pieter Praet
Should provide full test coverage of the stashing feature. Signed-off-by: Pieter Praet <pieter@praet.org>
2011-11-12emacs: add invisible space after the search widget field in notmuch-helloDmitry Kurochkin
It is very convenient when C-e (bound to `widget-end-of-line') ignores trailing spaces inside the search widget. But it only does so if a widget is not followed by a newline (that is why it works in the saved search widgets). The patch just adds an invisible space after the search widget to get the desirable behavior of `widget-end-of-line'. The extra space is also added to expected results of emacs tests.
2011-11-12smtp-dummy: clear sockaddr_in structure before use in bind()Tomi Ollila
Any junk bytes in sockaddr_in structure before passing that to bind() system call may cause problems.
2011-11-11test: use dtach(1) instead of screen(1) in emacs testsTomi Ollila
dtach is simpler than screen and is not setuid/setgid program so TMPDIR does not get cleared by dynamic loader when executed
2011-11-07emacs: improve hidden signatures handling in notmuch-show-advance-and-archiveDmitry Kurochkin
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.
2011-11-07test: `notmuch-show-advance-and-archive' with invisible signatureDmitry Kurochkin
Add Emacs test to check that `notmuch-show-advance-and-archive' works for the last message in thread with invisible signature.
2011-11-05test: do not set frame width in emacsDmitry Kurochkin
No need for `set-frame-width' in emacs tests since it runs in screen now.
2011-11-05test: avoid using screen(1) configuration filesDmitry Kurochkin
Set SCREENRC and SYSSCREENRC environment variables to "/dev/null" as suggested by Jim Paris to avoid potential problems with screen(1) configuration files.
2011-11-05test: run emacs inside screenDmitry Kurochkin
Before the change, emacs run in daemon mode without any visible buffers. Turns out that this affects emacs behavior in some cases. In particular, `window-end' function returns `point-max' instead of the last visible position. That makes it hard or impossible to implement some tests. The patch runs emacs in a detached screen(1) session. So that it works exactly as if it has a visible window. Note: screen terminates when emacs exits. So the patch does not introduce new "running processes left behind" issues.
2011-11-05test: json show format of message with inline attachment with filenameDmitry Kurochkin
The patch adds a test to check that json show format includes filenames for attachments with inline disposition.
2011-10-23notmuch-restore: check for extra arguments.David Bremner
We consider it an error to pass more than one file to restore, since extra ones are ignored.
2011-10-23notmuch-restore: implement --accumulate optionDavid Bremner
Modify command line argument handling to take a --accumulate flag. Test for extra arguments beyond the input file. The --accumulate switch causes the union of the existing and new tags to be applied, instead of replacing each message's tags as they are read in from the dump file. Based on a patch by Thomas Schwinge: id:"1317317857-29636-1-git-send-email-thomas@schwinge.name"
2011-10-23test/dump-restore: add tests for restore --accumulateDavid Bremner
Flesh out what ``notmuch restore --accumulate'' is supposed to do. Its tests are currently XFAILed; the functionality will be added in future patch(es). Based on a patch by Thomas Schwinge: id:"1317317811-29540-1-git-send-email-thomas@schwinge.name"
2011-10-23test/dump-restore: Fix quoting on grepDavid Bremner
Thanks to Thomas Schwinge for noticing yet another place where quoting matters. Since the shell translates \. to ., the regex passed to grep is too generous without the quotes. The use of [.] is the suggestion of Tomi Ollila.
2011-10-22test/dump-restore: expand test suite for dump-restore, make more robustDavid Bremner
Several new tests are added, and existing use of test_begin_subtest is replaced by test_expect_success to catch failing commands in cases where we execute more than one command. Based on changes in id:"1317317811-29540-1-git-send-email-thomas@schwinge.name"
2011-10-22test/test-lib.sh: update commentsDavid Bremner
- explain test_expect_equal_file - remove mention of test_expect_failure, since that function was removed. Based on id:"1317317811-29540-1-git-send-email-thomas@schwinge.name"
2011-10-16notmuch-dump: deprecate use of output file argument.David Bremner
We print an intentionally non-specific message on stderr, since it isn't clear if there will be some global output file argument to replace. We update the test suite atomically, since it relies on having the same text in two files.
2011-10-16notmuch-dump: treat any remaining arguments after the filename as search termsDavid Bremner
The main motivation here is allow the fast dumping of tag data for messages having certain tags. In practice it seems too slow to pipe dump to grep. All dump-restore tests should be working now, so we update test/dump-restore accordingly
2011-10-16test: add tests for command line arguments to notmuch-dumpDavid Bremner
The plan is to add the possibility of search terms after the file name, and the use of -- to stop looking for an output file name.
2011-10-12test: update dump-restore to use redirection instead of filename argsDavid Bremner
The idea here is that we want to deprecate the use of arguments to dump and restore to specify paths, since in particular we want to use the non-option arguments to dump to form a query.
2011-10-09test: add two emacs tests for show mode refreshJameson Graef Rollins
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.
2011-10-06test: test for absence of "Non-text part: application/pgp-*" lines in replyJameson Graef Rollins
In reply, the quoted text does not need to mention that the original message had "application/pgp-signed" or "application/pgp-encrypted" parts.
2011-10-06test/multipart: test for absence of "Non-text part:" lines in reply for multipart/* and message/rfc822 partsJameson Graef Rollins
There's no reason to output "Non-text part:" lines for parts that are not leaf nodes, eg. multipart/* and message/rfc822. We fix the text here to test for their absence. The next patch will fix reply accordingly.
2011-09-25test/atomicity: redirect output from "which"David Bremner
Without redirection, this produced some slightly confusing output in case gdb was present.
2011-09-24test: make atomicity setup conditional on gdb being present.David Bremner
The setup is useless if gdb is not present, so it doesn't hurt to skip it. The diff here is huge, but the commit is really just moving most of the script inside the initial if, and adding an else block to print a warning.
2011-09-24new: Wrap adding and removing messages in atomic sections.Austin Clements
This addresses atomicity of tag synchronization, the last atomicity problems in notmuch new. Each message add or remove is wrapped in its own atomic section, so interrupting notmuch new doesn't lose progress.
2011-09-13test: use test_expect_equal_file in atomicityDavid Bremner
The documentation claims this is more robust, and it seems to work fine to switch to the _file variant.
2011-09-13test: Convert atomicity test to use test_subtest_known_brokenDavid Bremner
This is required because test_expect_equal_failure went away.
2011-09-12test: Test atomicity of notmuch new.Austin Clements
This tests notmuch new's ability to recover from arbitrary stopping failures. It interrupts notmuch new after every database commit and, on every resulting database snapshot, re-runs notmuch new to completion and checks that the final database state is invariant.
2011-09-12test: Report test failures from test_expect_*Austin Clements
This makes test_expect_* return non-zero if the test fails, so the caller can make decisions based on this, such as setting test prerequisites.
2011-09-12test: Fix message when skipping test_expect_equal* testsAustin Clements
For these types of tests, the test name is previously recorded in a variable, not passed to the test function, so pass this variable to test_skip.
2011-09-12test: reset test_subtest_known_broken_ after each success/failure.David Bremner
This means that test_subtest_known_broken needs to be called before every known broken subtest, which is no different than what is documented for the test_begin_subtest case. The assumption is that every test ends up calling either skipping, calling test_ok_ or test_failure_ and and the latter in turn delegate to the known_broken versions in the case where test_subtest_known_broken_ is set.
2011-09-10test: mark multipart rfc822 part test as brokenDavid Bremner
Using the new test_subtest_known_broken support thanks to Dmitry Kurochkin. This makes the output less scary until we can fix the underlying problems.
2011-09-10test: remove documentation for test_expect_equal_failure.David Bremner
The actual function was deleted in commit 4cc67276
2011-09-10test: add emacs test for hiding a message following an HTML partDmitry Kurochkin
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
2011-09-10test: improve known broken tests supportDmitry Kurochkin
There is existing support for broken tests. But it is not convenient to use. The primary issue is that we have to maintain a set of test_expect_*_failure functions which are equivalent to the normal test_expect_* counterparts except for what functions are called for result reporting. The patch adds test_subtest_known_broken function which marks a subset as broken, making the normal test_expect_* functions behave as test_expect_*_failure. All test_expect_*_failure functions are removed. Test_known_broken_failure_ is changed to format details the same way as test_failure_ does. Another benefit of this change is that the diff when a broken test is fixed would be small and nice. Documentation is updated accordingly.
2011-09-10test: update documentation for test_emacs in test/READMEDmitry Kurochkin
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.
2011-09-05test: overhaul multipart test to test for improved message/rfc822 handlingJameson Graef Rollins
The main goal of this overhaul is to define how message/rfc822 parts should be handled. message/rfc822 parts should be output in a similar fashion to the outer message, including some subset of the rfc822 headers. The following decisions about formatting of message/rfc822 parts were made: The format and content of message/rfc822 parts shall be as similar as possible to that of full messages. In particular, for formatted outputs, the "content" of rfc822 part output should include "headers" and "body" fields). The "body" field shall include the body of the message. The "headers" field shall include the following headers, since these are the ones available from the GMimeMessage: "From" "To" "Cc" "Subject" "Date" However, for the case of --format=raw the raw rfc822 should be output, including all headers. A subset of relevant headers shall be output in reply. The test embedded rfc822 message is also modified to be itself multipart, so we can more fully test how all sub parts of the message part are output. Note added by Committer: Currently, expect one test (--format=raw --part=3, rfc822 part) to fail.