aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
Commit message (Collapse)AuthorAge
...
* 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.
| * test: delay watchdog checks in emacs.Gravatar David Bremner2013-01-29
|/ | | | | | | | | Instead of checking immediately for the watched process, delay a minute, or in the case that process-attributes returns nil, for two minutes. This is intended to cope with the case that process-attributes is unimplimented, and returns always returns nil. In this case, the watchdog check is the same as the two minute limit imposed by timeout.
* test/test-lib.sh: use vt100 as dtach terminal if TERM dumb or unset/emptyGravatar Tomi Ollila2013-01-24
| | | | | | | | | | | | The TERM environment variable is set to 'dumb' when running tests, but the original value of it is stored for echoing colors and running emacs (somewhat interactively) in detached session. Emacs requires some terminal control sequences to be available for interactive operation. In case original TERM is (also) 'dumb' (or unset/empty) emacs cannot run interactively. To fix this problem dtach (and emacs as it's child process) is run with TERM=vt100 in case original TERM was unset, empty or 'dumb'. This way there is a chance to run emacs tests with different user terminals and potentially find problems there.
* test/tagging: add test for naked punctuation in tags; compare with quoting ↵Gravatar David Bremner2013-01-07
| | | | | | | | | spaces. This test also serves as documentation of the quoting requirements. The comment lines are so that it exactly matches the man page. Nothing more embarrassing than having an example in the man page fail.
* test/tagging: add test for exotic message-ids and batch taggingGravatar David Bremner2013-01-07
| | | | | | The (now fixed) bug that this test revealed is that unquoted message-ids with whitespace or other control characters in them are split into several tokens by the Xapian query parser.
* test/tagging: add tests for exotic tagsGravatar David Bremner2013-01-07
| | | | We test quotes seperately because they matter to the query escaper.
* test/tagging: add basic tests for batch tagging functionalityGravatar David Bremner2013-01-07
| | | | | This tests argument parsing, blank lines and comments, and basic hex decoding functionality.
* test/tagging: add test for error messages of tag --batchGravatar David Bremner2013-01-07
| | | | | | This is based on the similar test for notmuch restore, but the parser in batch tagging mode is less tolerant of a few cases, in particular those tested by illegal_tag.
* emacs: Use the minibuffer for CLI error reportingGravatar Austin Clements2013-01-06
| | | | | | | | | | | | | | | | We recently switched to popping up a buffer to report CLI errors, but this was too intrusive, especially for transient errors and especially since we made fewer things ignore errors. This patch changes this to display a basic error message in the minibuffer (using Emacs' usual error handling path) and, if there are additional details, to log these to a separate error buffer and reference the error buffer from the minibuffer message. This is more in line with how Emacs typically handles errors, but makes the details available to the user without flooding them with the details. Given this split, we pare down the basic message and make it more user-friendly, and also make the verbose message even more detailed (and more debugging-oriented).
* dump/restore: Use Xapian queries for batch-tag formatGravatar Austin Clements2013-01-06
| | | | | | | | | | | | | | This switches the new batch-tag format away from using a home-grown hex-encoding scheme for message IDs in the dump to simply using Xapian queries with Xapian quoting syntax. This has a variety of advantages beyond presenting a cleaner and more consistent interface. Foremost is that it will dramatically simplify the quoting for batch tagging, which shares the same input format. While the hex-encoding is no better or worse for the simple ID queries used by dump/restore, it becomes onerous for general-purpose queries used in batch tagging. It also better handles strange cases like "id:foo and bar", since this is no longer syntactically valid.
* dump: Disallow \n in message IDsGravatar Austin Clements2013-01-06
| | | | | | | | | | | | | | | When we switch to using regular Xapian queries in the dump format, \n will cause problems, so we disallow it. Specially, while Xapian can quote and parse queries containing \n without difficultly, quoted queries containing \n still span multiple lines, which breaks the line-orientedness of the dump format. Strictly speaking, we could still round-trip these, but it would significantly complicate restore as well as scripts that deal with tag dumps. This complexity would come at absolutely no benefit: because of the RFC 2822 unfolding rules, no amount of standards negligence can produce a message with a message ID containing a line break (not even Outlook can do it!). Hence, we simply disallow it.
* notmuch-restore: handle empty input file, leading blank lines and comments.Gravatar David Bremner2013-01-06
| | | | | | | | | | This patch corrects several undesirable behaviours: 1) Empty files were not detected, leading to buffer read overrun. 2) An initial blank line cause restore to silently abort 3) Initial comment line caused format detection to fail
* test/dump-restore: new tests for empty files and leading comments/whitespace.Gravatar David Bremner2013-01-06
| | | | | Three of these are marked broken; the third is a regression test, since it passes by virtue of batch-tag being the default input format.
* test: notmuch search --format=text0Gravatar Jani Nikula2012-12-18
|
* test: conform to content length, encoding fieldsGravatar Peter Wang2012-12-17
| | | | | | Update tests to expect content-length and content-transfer-encoding fields in show --format=json output, for leaf parts with omitted body content.
* test: normalize only message filenames in show jsonGravatar Peter Wang2012-12-17
| | | | | | | notmuch_json_show_sanitize replaced "filename" field values even in part structures, where the value is predictable. Make it only normalize the filename value if it is an absolute path (begins with slash), which is true of the Maildir filenames that were intended to be normalized away.
* emacs: Use --format-version for search, show, and replyGravatar Austin Clements2012-12-16
|
* test: Sanity tests for the --format-version argumentGravatar Austin Clements2012-12-16
|
* test: Test search's handling of subprocess errorsGravatar Austin Clements2012-12-16
|
* emacs: Use unified error handling in searchGravatar Austin Clements2012-12-16
| | | | | | This slightly changes the output of an existing test since we now report non-zero exits with a pop-up buffer instead of at the end of the search results.
* test: Test show's handling of subprocess errorsGravatar Austin Clements2012-12-16
|
* test: emacs: new tests "notmuch-show: {add,remove} multiple tags {to,from} ↵Gravatar Pieter Praet2012-12-11
| | | | | | | | | | | | | | | | single message" * test/emacs: - Rename subtests "{Add,Remove} tag from notmuch-show view" to "notmuch-show: {add,remove} single tag {to,from} single message" to be consistent with the following tests. - New subtest "notmuch-show: add multiple tags to single message": `notmuch-show-add-tag' ("+") can add multiple tags to a message. - New subtest "notmuch-show: remove multiple tags from single message": `notmuch-show-remove-tag' ("-") can remove multiple tags from a message.
* test/dump-restore: add test for warning/error messagesGravatar David Bremner2012-12-09
| | | | | | We want to test both that error/warning messages are generated when they should be, and not generated when they should not be. This varies between restore and batch tagging.