aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2017-07-12cli: add space separator for keyword, string, and int argumentsDavid Bremner
Defer the complication of optional boolean arguments for later (never?).
2017-07-12cli: change api of parse_optionDavid Bremner
The idea is to allow it (in a future commit) advance to the next argv element to get a value
2017-07-05test/crypto: add test for corrupted signaturesDavid Bremner
Have an empty list of signatures is not the nicest mechanism to signal complete failure to verify, but it's the one we currently have.
2017-07-05test: add test for modified pgp/mime signed messageDavid Bremner
This is a good thing to test in any case, but particularly as we hit the dark corners of the gmime crypto API.
2017-07-05test: mark test as broken in gmime 3.0David Bremner
Currently I'm not sure what the intent of this test is, so it's not clear if the new answer is better or worse than the old one.
2017-07-05test: mark inclusion of headers as broken in gmime-2.xDavid Bremner
The output of headers here reflects an underlying bug / quirk of gmime-2.6.
2017-07-05test/multipart: reorganize creation of multipart messageDavid Bremner
We want to have the bodies of the multipart available in a file on their own for planned modifications to tests.
2017-07-04cli: implement structured output version 4David Bremner
Since the error field is unused by the emacs front end, no changes are needed other than bumping the format version number. As it is, this is a bit overengineered, but it will reduce duplication when we support gmime 3.0
2017-07-04emacs: convert to use format-version 3David Bremner
Keeping the emacs interface running old format-versions makes it impossible to test new format-versions or deprecate old ones.
2017-07-01lib/index: add simple html filterDavid Bremner
The filter just drops all (HTML) tags. As an enabling change, pass the content type to the filter constructor so we can decide which scanner to user.
2017-06-01Merge branch 'release'David Bremner
2017-06-01cli/dump: don't include tags when not asked forDavid Bremner
Add in the analogous test for tags that is given for properties a few lines below.
2017-06-01test: add known broken test --include=propertiesDavid Bremner
Reported in [1], --include=properties currently implies --include=tags, but it should not. [1] id:87y3u8vjbo.fsf@tethera.net
2017-05-31test: define GMime version dependant breakageDavid Bremner
We have some tests where the gmime 3 behaviour seems like a bug fix, others where it's less clear, so we allow both possibilities.
2017-05-30test/thread-naming: remove excess escaping from sender address.David Bremner
This is another case where the behaviour of gmime-2.6 and gmime-3.0 seems to differ. It may be that we prefer the more lax parsing of the previous version, but that should be tested separately.
2017-05-26exit lingering gpg agents at the end of relevant testsTomi Ollila
Since gnupg 2.1.20, gpg-agent no longer shut itself down when $GNUPGHOME directory is removed. Add exit hooks to the test modules which execute `gpgconf --kill all` Add exit hooks to execute `gpgconf --kill all` in the modules that create $GNUPGHOME for gpg to work with.
2017-05-26test-lib.sh: add "atexit" functionalityTomi Ollila
New function at_exit_function registers given function to be called at script termination. Functions so registered are called in the reverse order of their registration; no arguments are passed. Function is called only once; re-adding with function name already registered will remove previous registration. New function rm_exit_function can be used to remove registration. Modules (and possibly test-lib.sh functions) in future commits will register such functions.
2017-05-12build: switch to hiding libnotmuch symbols by defaultJani Nikula
The dynamic generation of the linker version script for libnotmuch exports has grown rather complicated. Reverse the visibility control by hiding symbols by default using -fvisibility=hidden, and explicitly exporting symbols in notmuch.h using #pragma GCC visibility. (We could also use __attribute__ ((visibility ("default"))) for each exported function, but the pragma is more convenient.) The above is not quite enough alone, as it would "leak" a number of weak symbols from Xapian and C++ standard library. Combine it with a small static version script that filters out everything except the notmuch_* symbols that we explicitly exposed, and the C++ RTTI typeinfo symbols for exception handling. Finally, as the symbol hiding test can no longer look at the generated symbol table, switch the test to parse the functions from notmuch.h.
2017-05-09lib: Add regexp expansion for for tags and pathsDavid Bremner
From a UI perspective this looks similar to what was already provided for from, subject, and mid, but the implementation is quite different. It uses the database's list of terms to construct a term based query equivalent to the passed regular expression.
2017-05-09lib: Add regexp searching for mid: prefixDavid Bremner
The bulk of the change is passing in the field options to the regexp field processor, so that we can properly handle the fallback (non-regexp case).
2017-04-20test: add known broken test for indexing htmlDavid Bremner
'quite' on IRC reported that notmuch new was grinding to a halt during initial indexing, and we eventually narrowed the problem down to some html parts with large embedded images. These cause the number of terms added to the Xapian database to explode (the first 400 messages generated 4.6M unique terms), and of course the resulting terms are not much use for searching. The second test is sanity check for any "improved" indexing of HTML.
2017-04-13test: add 'lkml' corpusDavid Bremner
These 210 messages are in several long threads, which is good for testing our threading code, and may be useful just as a larger test corpus in the future.
2017-04-06test: remove debugging "output"David Bremner
2017-04-06test: standardize argument order to test_expect_equal_fileDavid Bremner
It is annoying to debug failing tests when the interpretation of the diffs is reversed for some tests.
2017-04-01Merge branch 'release'David Bremner
Final 0.24.1 release
2017-04-01cli/dump: bump dump format version to 3David Bremner
No changes to the format of the body, but the header format was fixed, and version 2 headers probably shouldn't be relied on.
2017-04-01cli/dump: fix bug in dump headerDavid Bremner
Fix copy paste error.
2017-04-01test: add known broken test for dump headerDavid Bremner
Apparently nobody uses the list of "what was included in the dump"
2017-03-31test: add known broken test for dump headerDavid Bremner
Apparently nobody uses the list of "what was included in the dump"
2017-03-29Merge branch 'release'David Bremner
Another regexp search fix.
2017-03-29lib: handle empty string in regexp field processorsDavid Bremner
The non-field processor behaviour is is convert the corresponding queries into a search for the unprefixed terms. This yields pretty surprising results so I decided to generate a query that would match the terms (i.e. none with that prefix) generated for an empty header.
2017-03-29test: add known broken test for null from: and subject: queryDavid Bremner
These queries currently fail with field processors enabled because the code expects a non-empty string.
2017-03-25Merge branch 'release'David Bremner
wildcard search fixes, plus release busywork
2017-03-25tests: add compatibility layerMikhail
Make test-lib-common.sh load test-lib-<$PLATFORM>.sh to create additional shim for platform specifics. Use test-lib-FREEBSD.sh to call GNU utilities instead of native ones. - amended by db following Tomi's suggestions
2017-03-24lib: only trigger phrase processing for regexp fields when neededDavid Bremner
The argument is that if the string passed to the field processor has no spaces, then the added quotes won't have any benefit except for disabling wildcards. But disabling wildcards doesn't seem very useful in the normal Xapian query parser, since they're stripped before generating terms anyway. It does mean that the query 'from:"foo*"' will not be precisely equivalent to 'from:foo' as it is for the non field-processor version.
2017-03-24test: add known broken tests wildcard search in from and subjectDavid Bremner
This was broken by the addition of regexp searching. The detection of wildcards is not currently done in the recursive call to parse_query, because of quoting issues.
2017-03-22lib: replace deprecated n_q_count_messages with status returning versionDavid Bremner
This function was deprecated in notmuch 0.21. We re-use the name for a status returning version, and deprecate the _st name. One or two remaining uses of the (removed) non-status returning version fixed at the same time
2017-03-22lib: replace deprecated n_q_search_messages with status returning versionDavid Bremner
This function was deprecated in notmuch 0.21. We re-use the name for a status returning version, and deprecate the _st name.
2017-03-18rename libutil.a to libnotmuch_util.aDavid Bremner
Apparently some systems (MacOS?) have a system library called libutil and the name conflict causes problems. Since this library is quite notmuch specific, rename it to something less generic.
2017-03-15test-databases: use wget or curl to download test databasesTomi Ollila
Often Linux systems are shipped with wget(1) by default (and no curl). Many BSDs, macOS, and e.g. some Linux minimal/container images comes with curl(1) (and no wget). Attempting to download with curl if wget is not available increases the likelihood for this to succeed.
2017-03-15lib: clamp return value of g_mime_utils_header_decode_date to >=0David Bremner
For reasons not completely understood at this time, gmime (as of 2.6.22) is returning a date before 1900 on bad date input. Since this confuses some other software, we clamp such dates to 0, i.e. 1970-01-01.
2017-03-15lib: add known broken test for parsing bad dates.David Bremner
This reproduces the symptoms of bug report id:20150422065630.6330.90536@hoothoot
2017-03-12fix out of tree testsTomi Ollila
Use $NOTMUCH_SRCDIR/ instead of $TEST_DIRECTORY/../ (in those 2 places) where reference to source directory instead of build directory is required.
2017-03-10test: atomicity.py: improve exit probability on failureTomi Ollila
Some gdb python exceptions on some os environments (e.g. macOS Sierra, non-codesigned gdb) do not make gdb exit (but to drop down to nonexistent command line?). Mitigate this chance by explict SystemExit on all exceptions. The contents of output file 'gdb.out' is unchanged.
2017-03-09bindings/python: test python Database.get_revision ()Gaute Hope
Here is a test for Database.get_revision (), based on the first part of T570-revision-tracking.sh.
2017-03-09test: require test_begin_subtest before test_expect_codeJani Nikula
Unify the subtests by requiring test_begin_subtest before test_expect_code. (Similar change for test_expect_success has already been done.) This increases clarity in the test scripts by having a separate line for the start of the subtest with the heading, and makes it possible to simplify the test infrastructure by making all subtests similar.
2017-03-09test: require test_begin_subtest before test_expect_successJani Nikula
Unify the subtests by requiring test_begin_subtest before test_expect_success. (Similar change for test_expect_code will follow.) This increases clarity in the test scripts by having a separate line for the start of the subtest with the heading, and makes it possible to simplify the test infrastructure by making all subtests similar.
2017-03-09test: drop the implicit prereq check mechanism from test_expect_*Jani Nikula
The only place where we use the implicit prereq check is T000-basic.sh where we check that it works. It's an added complication that we don't use. Remove it. The test_have_prereq function can still be used for the same effect in subtests that use test_begin_subtest. For now, this will make it impossible to have prereqs in one-line subtests that don't require test_begin_subtest. This will be fixed in follow-up work.
2017-03-09test: ensure test_begin_subtest has been called before test_expect_*Jani Nikula
This is the expectation, increase robustness of the test suite by requiring it.
2017-03-09test: only accept short and long options, not silly in-betweensJani Nikula
It's not notmuch style to accept sloppy parameter names.