aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/search
Commit message (Collapse)AuthorAge
* test: add some exclude testsGravatar Mark Walters2012-04-07
| | | | | | | | Systematically test the exclude options for search. Also move the search existing exclude tests into the new test. There is some overlap between the two sets of tests but many of the existing ones are there because they triggered bugs in the past so I have kept them to ensure coverage.
* test: add tests for message only searchGravatar Mark Walters2012-03-18
| | | | | | | This adds three tests for --output=messages searches. One test is for the case when one exclude tag does not occur in the Xapian database. This triggers a Xapian bug in some cases and causes the whole exclusion to fail. The next commit avoids this bug.
* test: the test for the exclude code mistakenly excludes the tag "="Gravatar Mark Walters2012-03-18
| | | | | | | The tests for the exclude code in search and count use the line notmuch config set search.exclude_tags = deleted which actually sets the exclude tags to be "=" and "deleted". Remove the "=" from this line.
* test: update search test to reflect exclude flagGravatar Mark Walters2012-03-02
| | | | | | notmuch-search.c now returns all matching threads even if it the match is a search.tag_excluded message (but with a mark indicating this). Update the test to reflect this.
* test: add tests for new cli --no-exclude optionGravatar Mark Walters2012-03-02
| | | | | | The tests test the new --no-exclude option to search and count. There were no existing tests for the exclude behaviour for count so added these too.
* config: only exclude messages if 'search.exclude_tags' is explicitly setGravatar Pieter Praet2012-01-23
| | | | | | | | | | | | Currently, the 'search.exclude_tags' option is automatically set to "deleted;spam;" if it's missing from the config file. This violates the Principle of Least Surprise, so *only* set 'search.exclude_tags' to "deleted;spam;" if we didn't find a configuration file at all. This patch is actually Austin Clements' work: id:"20120117203211.GQ16740@mit.edu"
* test: only exclude "deleted" messages from search if explicitly configuredGravatar Pieter Praet2012-01-23
| | | | | | | | | Currently, the 'search.exclude_tags' option is automatically set to "deleted;spam;" if it's missing from the config file. This violates the Principle of Least Surprise, so update the tests to *only* expect the exclusion of messages which are tagged "deleted" if the 'search.exclude_tags' option is explicitly set *and* contains that tag.
* search: Support automatic tag exclusionsGravatar Austin Clements2012-01-16
| | | | | | This adds a "search" section to the config file and an "auto_tag_exclusions" setting in that section. The search and count commands pass tag tags from the configuration to the library.
* test: add two new messages to corpus with iso-8859-1 encodingGravatar David Bremner2011-12-31
| | | | | | One is quoted printable, the other users 8 bit encoding. The latter triggers a bug in the python bindings due to missing call to g_mime_init. The corresponding test is marked broken in this commit.
* test: use file based comparison for search '*' testGravatar David Bremner2011-12-31
| | | | | This seems a bit easier to maintain, and is more accurate since lines are not joined together.
* test: move utf-8 subject search test from json to search test scriptGravatar Jameson Graef Rollins2011-06-01
| | | | | | This test doesn't have anything to do with json, and has everything to do with testing search capability, so I'm not sure why it was in the wrong place.
* test: Move a test from search to search-output, and add a similar json testGravatar Jameson Graef Rollins2011-06-01
| | | | | | | | | The "Search for non-existent message prints nothing" test fits better with the existing tests in search-output, so move it there. Also add a similar test for the --format=json case. These tests also use the new test_expect_equal_file function, (to ensure that the presence of a trailing newline is correctly tested).
* tag signed/encrypted during notmuch newGravatar Jameson Graef Rollins2011-05-27
| | | | | | | | This patch adds the tag "signed" to messages with any multipart/signed parts, and the tag "encrypted" to messages with any multipart/encrypted parts. This only occurs when messages are indexed during notmuch new, so a database rebuild is required to have old messages tagged.
* test: change "#!/bin/bash" to "#!/usr/bin/env bash" enhances portabilityGravatar Joel Borggrén-Franck2011-05-27
| | | | | | Change #!/bin/bash at start of tests to "#!/usr/bin/env bash". That way systems running on bash < 4 can prepend bash >= 4 to path before running the tests.
* search: Move lwn tests into their own file.Gravatar Carl Worth2011-03-09
| | | | | Since it's much easier to debug and fix these if they can be run on their own.
* Add a few tests for searching LWN emails.Gravatar Thomas Schwinge2011-03-09
| | | | | | These tests should pass -- but they currently don't. Signed-off-by: Thomas Schwinge <thomas@schwinge.name>
* test: Fix bugs detected thanks to the previous commitGravatar Michal Sojka2010-11-16
|
* test: Search for non-existent message should return nothingGravatar Michal Sojka2010-11-04
| | | | | | | | | | | | | My scripts expect that empty search result is actually empty. Since commit 6dcb7592, even empty search prints a newline character and this breaks my scripts. This patch adds a test for this bug. In the test I cannot use test_expect_equal function as $() operator suppresses the final newline and this kind of difference is not detected. test/search | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
* test: Fix the search and dump-restore tests to operator on non-empty mail store.Gravatar Carl Worth2010-09-20
| | | | | We do this with a new add_email_corpus function that establishes a mail store with 50 messages from the notmuch mailing list.
* test: Remove useless NOTMUCH variable (in favor of simply "notmuch")Gravatar Carl Worth2010-09-20
| | | | | | | | | | When the NOTMUCH variable was originally invented it was used as an explicit path to the notmuch binary being tested. Today, the test suite sets the PATH variable instead, so the NOTMUCH variable always has a value of simply "notmuch". We simplifying that by using the constant value rather than the continual variable reference.
* test: Rename all tests to get rid of the ugly numbers in file names.Gravatar Carl Worth2010-09-17
The numbers were meaningless, and they made it hard to find a file of interest. Instead, we get the ordering we want by adding an explicit list of tests to run to the notmuch-test script.