aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
Commit message (Collapse)AuthorAge
* test: add tests for notmuch search --offset and --limitGravatar Jani Nikula2011-11-15
| | | | Signed-off-by: Jani Nikula <jani@nikula.org>
* test: add tests for notmuch countGravatar Jani Nikula2011-11-15
| | | | Signed-off-by: Jani Nikula <jani@nikula.org>
* test: Add a test script for "notmuch tag"Gravatar Austin Clements2011-11-14
|
* test/atomicity: change shebang to '#!/usr/bin/env bash'Gravatar Tomi Ollila2011-11-14
|
* test: make smtp-dummy work with Emacs 24Gravatar Thomas Jost2011-11-13
| | | | | In Emacs 24, a space is expected after a SMTP response code. If we don't respect that, smtpmail-send-it will wait forever.
* 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.
* exec emacs at the end of run_emacs scriptGravatar Tomi Ollila2011-11-12
| | | | | In the last line of run_emacs, exec the emacs process. With one fork less the process list is (also) neater.
* 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: add invisible space after the search widget field in notmuch-helloGravatar Dmitry Kurochkin2011-11-12
| | | | | | | | | 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.
* smtp-dummy: clear sockaddr_in structure before use in bind()Gravatar Tomi Ollila2011-11-12
| | | | | Any junk bytes in sockaddr_in structure before passing that to bind() system call may cause problems.
* test: use dtach(1) instead of screen(1) in emacs testsGravatar Tomi Ollila2011-11-11
| | | | | dtach is simpler than screen and is not setuid/setgid program so TMPDIR does not get cleared by dynamic loader when executed
* 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: do not set frame width in emacsGravatar Dmitry Kurochkin2011-11-05
| | | | | No need for `set-frame-width' in emacs tests since it runs in screen now.
* test: avoid using screen(1) configuration filesGravatar Dmitry Kurochkin2011-11-05
| | | | | | Set SCREENRC and SYSSCREENRC environment variables to "/dev/null" as suggested by Jim Paris to avoid potential problems with screen(1) configuration files.
* test: run emacs inside screenGravatar Dmitry Kurochkin2011-11-05
| | | | | | | | | | | | | 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.
* test: json show format of message with inline attachment with filenameGravatar Dmitry Kurochkin2011-11-05
| | | | | The patch adds a test to check that json show format includes filenames for attachments with inline disposition.
* notmuch-restore: check for extra arguments.Gravatar David Bremner2011-10-23
| | | | | We consider it an error to pass more than one file to restore, since extra ones are ignored.
* notmuch-restore: implement --accumulate optionGravatar David Bremner2011-10-23
| | | | | | | | | | | | | 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"
* test/dump-restore: add tests for restore --accumulateGravatar David Bremner2011-10-23
| | | | | | | | | | 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"
* test/dump-restore: Fix quoting on grepGravatar David Bremner2011-10-23
| | | | | | | | 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.
* test/dump-restore: expand test suite for dump-restore, make more robustGravatar David Bremner2011-10-22
| | | | | | | | | | 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"
* test/test-lib.sh: update commentsGravatar David Bremner2011-10-22
| | | | | | | - 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"
* notmuch-dump: deprecate use of output file argument.Gravatar David Bremner2011-10-16
| | | | | | | | | 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.
* notmuch-dump: treat any remaining arguments after the filename as search termsGravatar David Bremner2011-10-16
| | | | | | | | | 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
* test: add tests for command line arguments to notmuch-dumpGravatar David Bremner2011-10-16
| | | | | 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.
* test: update dump-restore to use redirection instead of filename argsGravatar David Bremner2011-10-12
| | | | | | 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.
* 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: test for absence of "Non-text part: application/pgp-*" lines in replyGravatar Jameson Graef Rollins2011-10-06
| | | | | | In reply, the quoted text does not need to mention that the original message had "application/pgp-signed" or "application/pgp-encrypted" parts.
* test/multipart: test for absence of "Non-text part:" lines in reply for ↵Gravatar Jameson Graef Rollins2011-10-06
| | | | | | | | | multipart/* and message/rfc822 parts 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.
* test/atomicity: redirect output from "which"Gravatar David Bremner2011-09-25
| | | | | Without redirection, this produced some slightly confusing output in case gdb was present.
* test: make atomicity setup conditional on gdb being present.Gravatar David Bremner2011-09-24
| | | | | | | 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.
* new: Wrap adding and removing messages in atomic sections.Gravatar Austin Clements2011-09-24
| | | | | | 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.
* test: use test_expect_equal_file in atomicityGravatar David Bremner2011-09-13
| | | | | The documentation claims this is more robust, and it seems to work fine to switch to the _file variant.
* test: Convert atomicity test to use test_subtest_known_brokenGravatar David Bremner2011-09-13
| | | | This is required because test_expect_equal_failure went away.
* test: Test atomicity of notmuch new.Gravatar Austin Clements2011-09-12
| | | | | | | 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.
* test: Report test failures from test_expect_*Gravatar Austin Clements2011-09-12
| | | | | | 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.
* test: Fix message when skipping test_expect_equal* testsGravatar Austin Clements2011-09-12
| | | | | | 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.
* test: reset test_subtest_known_broken_ after each success/failure.Gravatar David Bremner2011-09-12
| | | | | | | | | | | 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.
* test: mark multipart rfc822 part test as brokenGravatar David Bremner2011-09-10
| | | | | | 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.
* test: remove documentation for test_expect_equal_failure.Gravatar David Bremner2011-09-10
| | | | The actual function was deleted in commit 4cc67276
* 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: improve known broken tests supportGravatar Dmitry Kurochkin2011-09-10
| | | | | | | | | | | | | | | | | 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.
* 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: overhaul multipart test to test for improved message/rfc822 handlingGravatar Jameson Graef Rollins2011-09-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* test: Fix date in test message in multipart test.Gravatar Jameson Graef Rollins2011-09-05
| | | | | | | | | | | | | | | | The test message date, "Tue, 05 Jan 2001 15:43:57 -0000", is not actually a real date. 05 Jan 2001 was in fact a Friday, not a Tuesday. Date parsers (such as "date" in coreutils) will return "Fri" as the day for this string, even if "Tue" is specified. Also, the time zone "-0000" is actually always returned as "+0000", so we change that here was well. This will be relevant for later patches when we begin parsing rfc822 part headers, where gmime returns a parsed date string. If we do want to test date parsing, we should do that in a separate test.
* test: some small fixes to multipart testGravatar Jameson Graef Rollins2011-09-05
| | | | | | | | There were two "--format=text --part=0" tests. One of them was supposed to be a test for "--format=text --part=1". There were also two errant "test_expect_equal_file OUTPUT EXPECTED" lines, that are removed here.
* emacs: Fix to unconditionally display subject changes in collapsed thread viewGravatar Carl Worth2011-07-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The feature to show subject changes in the collapsed thread view was originally added (8ab433607) with an option (notmuch-show-always-show-subject) to display the subject for all messages, even when there was no change. The subsequent commit (4f04d273) changed the sense of the test (or to and) and the name of the controlling variable (notmuch-show-elide-same-subject). But this commit is broken in a few ways: 1. The original definition of notmuch-show-always-show-subject was left around But the variable isn't actually used in the code at all, so it just adds clutter and confusion to the customization interface. 2. The name and description of the controlling variable doesn't match the implementation The name suggests that setting the variable to t will cause repeated subjects to be elided, (suggesting that when it is nil all subjects will be shown). However, when the variable is nil, no subjects are shown. So a correct name for the variable in this sense would be notmuch-show-subject-changes. Showing subject changes is a useful feature, and should be on by default. (We don't want to bury generally useful features behind customizations that users have to find). Rather than fixing the name of the variable and changing its default value, here we remove the condition entirely, such that the feature is enabled unconditionally. So both the currently-used variable and the stale definition of the formerly-used are removed. Also, the one relevant test-suite result is updated, (showing the intial subject of a collapsed thread, and no subject display for later messages that do not change the subject).
* test: document test_expect_equal_fileGravatar Jameson Graef Rollins2011-06-29
| | | | | This test was not properly documented when it was originally added (my bad).
* test: Nix increment_mtime.Gravatar Austin Clements2011-06-29
| | | | | With the fix for the mtime race, this workaround is no longer necessary.