aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
Commit message (Collapse)AuthorAge
...
* test: tree: remove require from testsGravatar Mark Walters2013-11-07
| | | | | Now tree is included by default we don't need to "require it" in the test.
* emacs: tree: remove test for emacs from tree testGravatar Mark Walters2013-11-07
| | | | Now the test is in mainline we can remove the check that emacs exists.
* test: move emacs-tree test into mainlineGravatar Mark Walters2013-11-07
| | | | | We move the emacs-tree test and associated files into the main test directory and add the test to the list in notmuch-test.
* cli: add compact --backup=DIRECTORY option, don't backup by defaultGravatar Jani Nikula2013-11-07
| | | | | It's the user's decision. The recommended way is to do a database dump anyway. Clean up the relevant printfs too.
* test: fix compact backup / restore testGravatar David Bremner2013-11-06
| | | | | | It was looking in completely the wrong place for the backup and the (test) xapian database. Unfortunately test_begin_subtest hides the relevant errors.
* test: Add compact testGravatar Ben Gamari2013-10-31
| | | | Signed-off-by: Ben Gamari <bgamari.foss@gmail.com>
* emacs: show: use interactive instead of current-prefix-argGravatar Mark Walters2013-10-19
| | | | | | | | | Currently notmuch-show looks at the prefix-arg directly via current-prefix-arg. This changes it to use the interactive specification. One test (for elide-toggle functionality) set the prefix arg directly. Update this test to set the new argument directly.
* test: set mail host in emacs_deliverGravatar Mark Walters2013-10-14
| | | | | | | | | | | | | | | | | | One test (reply to encrypted message in the crypto test) recently started failing on some systems. The failure I saw were two extra lines of the form <87d2nbc5xg.fsf@host.i-did-not-set--mail-host-address--so-tickle-me> The test pipes the output through grep -v -e '^In-Reply-To:' -e '^References:' which would normally these two ids but it does not, in this case, because they are so long they get put on a separate line in the output. To fix this we set mail-host-address for emacs deliver. example.com seems a sensible address to use. This is short enough that we don't get the line breaks above and the tests then all pass.
* lib/cli: pass GMIME_ENABLE_RFC2047_WORKAROUNDS to g_mime_init()Gravatar Jani Nikula2013-09-14
| | | | | | | | | | | | | | As explained by Jeffrey Stedfast, the author of GMime, quoted in [1]: > Passing the GMIME_ENABLE_RFC2047_WORKAROUNDS flag to g_mime_init() > *should* solve the decoding problem mentioned in the thread. This > flag should be safe to pass into g_mime_init() without any bad side > effects and my unit tests do test that code-path. The thread being referred to is [2]. [1] id:87bo56viyo.fsf@nikula.org [2] id:08cb1dcd-c5db-4e33-8b09-7730cb3d59a2@gmail.com
* test: add known broken tests for known broken RFC 2047 encodingsGravatar Jani Nikula2013-09-14
| | | | | | Some common broken RFC 2047 encodings that we currently let gmime parse strictly. We could tell gmime to be forgiving in what it accepts as RFC 2047 encoding, making these tests pass.
* test: unset 'xpg_echo' bash shell optionGravatar Tomi Ollila2013-09-08
| | | | | | | | | | | When 'xpg_echo' bash shell option is unset (usually the default) echo builtin does not expand backslash-escape sequences by default (i.e. '\n' is echoed as '\n' instead of newline). Not all bash installations have this feature we depend on activated by default. Note that the feature is bash (and GNU /bin/echo) specific. It is used as it is convenient. If portability is needed (elsewhere) use printf(1) (also often available as a shell builtin).
* test: exit with nonzero value when not all tests completed successfullyGravatar Tomi Ollila2013-09-08
| | | | | | | | If any of the tests in our test system is not passing the execution of the test suite completes with nonzero exit value. It is better to rely on the exit value of the test system instead of some arbitrary strings in test output (or use both).
* test: improve insert test reliability by checking message-id instead of countGravatar Jani Nikula2013-09-03
| | | | | There isn't a reported issue this would fix. Spotted by reading the test.
* test: add more maildir flag syncing related tests to insertGravatar Jani Nikula2013-09-03
| | | | Specifically test maildir flag syncing with insert.
* tags_to_maildir_flags: Don't rename if no flags changeGravatar Louis Rilling2013-09-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | notmuch_message_tags_to_maildir_flags() unconditionally moves messages from maildir directory "new/" to maildir directory "cur/", which makes messages lose their "new" status in the MUA. However some users want to keep this "new" status after, for instance, an auto-tagging of new messages. However, as Austin mentioned and according to the maildir specification, messages living in "new/" are not allowed to have flags, even if mutt allows it to happen. For this reason, this patch prevents moving messages from "new/" to "cur/", only if no flags have to be changed. It's hopefully enough to satisfy mutt (and maybe other MUAs showing the "new" status) users checking the "new" status. Changelog: * v2: Fix bool type as well as NULL returned despite having no errors (Austin Clements) * v4: Tag the related test (contributed by Michal Sojka) as working Signed-off-by: Louis Rilling <l.rilling@av7.net> [Condition for keeping messages in new/ was extended to satisfy all tests from the previous patch. -Michal Sojka] [Added by David Bremner, to keep the tests passing at each commit] update insert tests for new maildir synchronization rules As of id:1355952747-27350-4-git-send-email-sojkam1@fel.cvut.cz we are more conservative about moving messages from ./new to ./cur. This updates the insert tests to match
* test: Add some missing maildir synchronization testsGravatar Michal Sojka2013-09-03
| | | | | | As mentioned by Jani Nikula in id:87vcccp4y3.fsf@nikula.org, some cases of maildir synchronization are not covered by our tests. Let's add the missing tests.
* test: Adding non-maildir tags does not move message from new to curGravatar Michal Sojka2013-09-03
| | | | | | | | | | | | | | | | | | Some MUA's like mutt show the difference between "new" emails living in maildir directory new/, and "old" emails living in maildir directory cur/. However notmuch tag unconditionally moves selected messages from new/ to cur/, even if no maildir synchronized tag is changed. While maildir specification forbids messages with tags living in new/, there is no need to move messages to cur/ when no maildir synchronized tag is changed. Thus notmuch can remain transparent with respect to other MUA's. [ Edited commit log to better describe the intended changes, and tag the test as broken until the actual changes are implemented -- Louis Rilling ] Signed-off-by: Louis Rilling <l.rilling@av7.net> [ Converted to use test_subtest_known_broken, David Bremner ]
* test: test notmuch show --include-html optionGravatar Tomi Ollila2013-08-27
| | | | | Test new --include-html option added to notmuch show command with json output message parts containing text in latin1 and utf8 format.
* test: test notmuch count --output=filesGravatar Jani Nikula2013-08-24
| | | | Add tests for notmuch count --output=files option.
* test: test notmuch search --duplicate=NGravatar Jani Nikula2013-08-24
| | | | Add test for notmuch search --duplicate=N option.
* test: Canonicalize RFC 2047 encoding and charsetGravatar Austin Clements2013-08-20
| | | | | | | RFC 2047 states that the encoding and charset in an encoded word are case-insensitive, so force them to lower case in the reply test. This fixes an issue caused by GMime versions (somewhere between 2.6.10 and 2.6.16), which changed the capitalization of the encoding.
* reply: Use RFC 2822/MIME wholly for text format templateGravatar Austin Clements2013-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, reply's default text format used an odd mix of RFC 2045 MIME encoding for the reply template's body and some made-up RFC 2822-like UTF-8 format for the headers. The intent was to present the headers to the user in a nice, un-encoded format, but this assumed that whatever ultimately sent the email would RFC 2047-encode the headers, while at the same time the body was already RFC 2045 encoded, so it assumed that whatever sent the email would *not* re-encode the body. This can be fixed by either producing a fully decoded UTF-8 reply template, or a fully encoded MIME-compliant RFC 2822 message. This patch does the latter because it is a) Well-defined by RFC 2822 and MIME (while any UTF-8 format would be ad hoc). b) Ready to be piped to sendmail. The point of the text format is to be minimal, so a user should be able to pop up the template in whatever editor they want, edit it, and push it to sendmail. c) Consistent with frontend capabilities. If a frontend has the smarts to RFC 2047 encode the headers before sending the mail, it probably has the smarts to RFC 2047 decode them before presenting the template to a user for editing. Also, as far as I know, nothing automated consumes the reply text format, so changing this should not cause serious problems. (And if anything does still consume this format, it probably gets these encoding issues wrong anyway.)
* reply: Remove extraneous space from generated ReferencesGravatar Austin Clements2013-08-17
| | | | | | | | | | | | Previously, the References header code seemed to assume notmuch_message_get_header would return NULL if the header was not present, but it actually returns "". As a result of this, it was inserting an unnecessary space when concatenating an empty or missing original references header with the new reference. This shows up in only two tests because the text reply format later passes the whole reply template through g_mime_filter_headers, which has the side effect of stripping out this extra space.
* reply: Test replying to messages with RFC 2047-encoded headersGravatar Austin Clements2013-08-17
|
* test: Make symbol-test depend on libnotmuch.soGravatar Austin Clements2013-08-15
| | | | | | | | Without this $ make -j test intermittently fails and $ make clean; make test/symbol-test always fails (not that anybody would do the latter).
* test: test insert --create-folder optionGravatar Peter Wang2013-07-04
| | | | Add tests for notmuch insert --create-folder option.
* test: test insert --folder optionGravatar Peter Wang2013-07-01
| | | | Add tests for notmuch insert --folder option.
* test: add tests for insertGravatar Peter Wang2013-06-29
| | | | Add tests for new 'insert' command.
* emacs: Use S-exp format everywhereGravatar Austin Clements2013-06-24
| | | | | | This switches `notmuch-mua-reply' and `notmuch-query-get-threads' to the S-exp format. These were the last two uses of the JSON format in the Emacs frontend.
* revert: Removed top level --stderr= optionGravatar Tomi Ollila2013-06-24
| | | | | | | While looked good on paper, its attempted use caused confusion, complexity, and potential for information leak when passed through wrapper scripts. For slimmer code and to lessen demand for maintenance/support the set of commits which added top level --stderr= option is now reverted.
* test/basic: replaced find -perm +111 with portable alternativeGravatar Tomi Ollila2013-06-24
| | | | | | The find option syntax `-perm +111` is deprecated gnu find feature. The replacement `( -perm -100 -o -perm -10 -o -perm 1 )` should also work outside of the GNU domain.
* emacs: Use streaming S-expr parser for searchGravatar Austin Clements2013-06-01
| | | | | | | | | | | | In addition to being the Right Thing to do, this noticeably improves the time taken to display the first page of search results, since it's roughly an order of magnitude faster than the JSON parser. Interestingly, it does *not* significantly improve the time to completely fill a large search buffer because for large search buffers, the cost of creating author invisibility overlays and inserting text (which slows down with more overlays) dominates. However, the time required to display the first page of results is generally more important to the user experience.
* emacs: Use async process helper for searchGravatar Austin Clements2013-06-01
| | | | | | | | | | Previously, search started the async notmuch process directly. Now, it uses `notmuch-start-notmuch'. This simplifies the process sentinel a bit and means that we no longer have to worry about errors interleaved with the JSON output. We also update the tests of Emacs error handling, since the error output is now separated from the search results buffer.
* test: Remove extraneous Emacs error handling testGravatar Austin Clements2013-06-01
| | | | | | | We now check error handling more carefully in the last test in test/emacs and we're about to add more error handling tests. (This was also a strange place for this test, since it had nothing to do with large search buffers.)
* emacs: Simplify MIME part command implementationGravatar Austin Clements2013-05-31
| | | | | | | | | | | | | | | | | | | | This unifies the part button actions and the underlying part action functions into single interactive command that simply applies to the part containing point using the just-added part p-list text property instead of button properties. Since all part actions can be performed by applying the appropriate mm function to an mm-handle, this patch abstracts out the creation of mm handles, making the implementations of the part commands trivial. This also eliminates our special handling for part save in favor of using the appropriate mm function. This necessarily modifies the way we handle the default part button action, but in a way that does not change the meaning of the notmuch-show-part-button-default-action defcustom. Since these commands are no longer specific to buttons, this patch eliminates the extra metadata stored with each button. This also eliminates one rather special-purpose macro for a collection of general purpose part handling utilities.
* test: added --stderr=FILE testsGravatar Tomi Ollila2013-05-29
| | | | | | --stderr=FILE tests were added to test/help-test as it is the one doing most global option testing. Also, it was simplest to test this new option using `notmuch help` command.
* test: add tests for search --exclude=allGravatar Peter Wang2013-05-13
| | | | Test the new search --exclude=all option.
* lib/database.cc: change how the parent of a message is calculatedGravatar Aaron Ecay2013-05-13
| | | | | | | | | | | | | | | | | | | | Presently, the code which finds the parent of a message as it is being added to the database assumes that the first Message-ID-like substring of the In-Reply-To header is the parent Message ID. Some mail clients, however, put stuff other than the Message-ID of the parent in the In-Reply-To header, such as the email address of the sender of the parent. This can fool notmuch. The updated algorithm prefers the last Message ID in the References header. The References header lists messages oldest-first, so the last Message ID is the parent (RFC2822, p. 24). The References header is also less likely to be in a non-standard syntax (http://cr.yp.to/immhf/thread.html, http://www.jwz.org/doc/threading.html). In case the References header is not to be found, fall back to the old behavior. V2 of this patch, incorporating feedback from Jani and (indirectly) Austin.
* test: add tests for the handling of References and In-Reply-To headersGravatar Aaron Ecay2013-05-13
| | | | | | | | | These tests are known_broken, the following commit fixes them. amended per id:87txmi1zq3.fsf@nikula.org id:87vc6yalo7.fsf@zancas.localnet
* cli: config: fix config file save when the file does not existGravatar Jani Nikula2013-05-12
| | | | | | | | | | | | | | The use of realpath(3) in commit 58ed67992d0ec1fa505026105218fa449f7980b0 Author: Jani Nikula <jani@nikula.org> Date: Sun Apr 7 20:15:03 2013 +0300 cli: config: do not overwrite symlinks when saving config file broke config file save when the file does not exist, which results in 'notmuch setup' always failing to create a new config file. Fix by checking ENOENT from realpath(3).
* test: add basic test for notmuch setupGravatar Jani Nikula2013-05-12
| | | | And annotate with test_subtest_known_broken. Hooray.
* cli: config: do not overwrite symlinks when saving config fileGravatar Jani Nikula2013-04-14
| | | | | | | Use realpath to canonicalize the config path before writing. Previously 'notmuch setup' and 'notmuch config set' overwrote the config file even if it was a symbolic link.
* test: add some config file testsGravatar Jani Nikula2013-04-14
| | | | | Test the --config=FILE option, and add a broken test for writing config file through a symbolic link.
* test: notmuch count --batch and --input optionsGravatar Jani Nikula2013-04-01
|
* test: notmuch tag --remove-allGravatar Jani Nikula2013-03-30
|
* cli: config: make notmuch_config_open() "is new" parameter input onlyGravatar Jani Nikula2013-03-07
| | | | | | | | We now have a notmuch_config_is_new() function to query whether a config was created or not. Change the notmuch_config_open() is_new parameter into boolean create_new to determine whether the function should create a new config if one doesn't exist. This reduces the complexity of the API.
* test/README: mention the test_expect_equal_json and *sanitize* functionsGravatar Aaron Ecay2013-03-07
| | | | also fix one typo
* Merge branch 'release'Gravatar David Bremner2013-02-18
|\ | | | | | | | | | | | | add in NEWS from 0.15.2 Conflicts: NEWS
* | test/test-lib.sh: separate signaled exitGravatar Tomi Ollila2013-02-18
| | | | | | | | | | | | | | When execution of tests is interrupted by signal coming outside of the test system itself, output just one line "interrupted by signal <num>" message to standard output. This distinguishes the case from internal exit and reduces noise.
* | test/test-lib.sh: use $test_subtest_name in all testsGravatar Tomi Ollila2013-02-18
| | | | | | | | | | | | | | | | | | Set the variable '$test_subtest_name' in all functions which starts a new test and use that variable in all functions that output test results. Additionally output the latest '$test_subtest_name' in case of abnormal exit, to avoid confusion.