aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
Commit message (Collapse)AuthorAge
...
* | Document external dependencies in the test suiteGravatar Ethan Glasser-Camp2012-01-21
| | | | | | | | | | | | | | | | Add an explicit note to the README explaining what programs are necessary and the perhaps-surprising behavior of skipping tests if they aren't present. Signed-off-by: Ethan Glasser-Camp <ethan@betacantrips.com>
* | Fix dependency generation for compat, test, and utilGravatar Austin Clements2012-01-19
| | | | | | | | | | This adds source files in compat, test, and util to SRCS so that the top-level Makefile.local will generate dependency files for them.
* | 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.
* | cli: pick the user's address in a group list as from addressGravatar Jani Nikula2012-01-16
| | | | | | | | | | | | | | Messages received to a group list were not replied to using the from address in the list. Fix it. Signed-off-by: Jani Nikula <jani@nikula.org>
* | test: add known broken test for reply from address in named group listGravatar Jani Nikula2012-01-16
| | | | | | | | | | | | | | | | | | | | If a message was received to the user's address that was in a named group list, notmuch reply does not use that address for picking the from address. Groups lists are of the form: foo:bar@example.com,baz@example.com; Signed-off-by: Jani Nikula <jani@nikula.org>
* | test: don't bail out of `run_emacs' too early when missing prereqsGravatar Pieter Praet2012-01-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When running the Emacs tests in verbose mode, only the first missing prereq is reported because the `run_emacs' function is short-circuited early: #+begin_example emacs: Testing emacs interface missing prerequisites: [0] emacs(1) skipping test: [0] Basic notmuch-hello view in emacs SKIP [0] Basic notmuch-hello view in emacs #+end_example This can lead to situations reminiscent of "dependency hell", so instead of returning based on each individual `test_require_external_prereq's exit status, we now do so only after checking all the prereqs: #+begin_example emacs: Testing emacs interface missing prerequisites: [0] dtach(1) emacs(1) emacsclient(1) skipping test: [0] Basic notmuch-hello view in emacs SKIP [0] Basic notmuch-hello view in emacs #+end_example Also added missing prereq for dtach(1).
* | test: add tests for "notmuch reply" --reply-to=senderGravatar Mark Walters2012-01-14
| |
* | Merge branch 'release'Gravatar David Bremner2012-01-13
|\| | | | | | | | | | | Conflicts: notmuch-reply.c notmuch.1
* | python test "compare message ids"Gravatar Patrick Totzke2012-01-08
| | | | | | | | | | | | Introduces a second (trivial) test for the python bindings that searches for message ids and compares the output with that of `notmuch search`.
* | clean up "compare thread ids" python testGravatar Patrick Totzke2012-01-08
| | | | | | | | | | This makes the test script open the database in READ_ONLY mode and use the libraries own sorting methods instead of "sort".
| * emacs: fix notmuch-show-indent-messages-width customization variable nameGravatar Jameson Graef Rollins2012-01-05
| | | | | | | | | | The name was originally notmuch-indent-messages-width, which is inconsistent with our variable naming convention.
* | lib: call g_mime_init() from notmuch_database_open()Gravatar Kazuo Teramoto2011-12-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | As reported in id:"CAEbOPGyuHnz4BPtDutnTPUHcP3eYcRCRkXhYoJR43RUMw671+g@mail.gmail.com" sometimes gmime tries to access a NULL pointer, e.g. g_mime_iconv_open() tries to access iconv_cache that is NULL if g_mime_init() is not called. This causes notmuch to segfault when calling gmime functions. Calling g_mime_init() initializes iconv_cache and others variables needed by gmime, making sure they are initialized when notmuch calls gmime functions. Test marked fix by db.
* | 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/symbol-hiding: prepend new directory to LD_LIBRARY_PATHGravatar Tomi Ollila2011-12-31
| | | | | | | | | | | | | | Tester may have set LD_LIBRARY_PATH to find libraries required by notmuch. Therefore add $TEST_DIRECTORY/../lib to the beginning of current list of library paths in $LD_LIBRARY_PATH before running symbol-test.
* | test: Remove #! line from test-lib.shGravatar Austin Clements2011-12-29
| | | | | | | | | | | | | | | | It makes no sense to run test-lib.sh, so it makes no sense to give it an interpreter. This is particularly annoying for Emacs users who have executable-insert set, since the presence of the #! line will cause Emacs to mark test-lib.sh executable when saving it, which will in turn case the 'basic' test to fail.
* | test: Make generated message date a real dateGravatar Austin Clements2011-12-29
| | | | | | | | | | | | | | | | | | January 5, 2001 was a Tuesday, not a Friday. Jameson fixed this exact problem for the multipart test in ec2b0a98cc, but not for generate_message itself. As Jameson pointed out in ec2b0a98cc, if we want to test date parsing, we should do it separately.
* | test: allow user to choose which emacs to run tests with.Gravatar David Bremner2011-12-28
| | | | | | | | | | | | | | | | | | | | | | | | As we start to pay more attention to emacs24, it helps to be able to select a different version of emacs to run the tests with to verify version specific bugs. A separate variable TEST_EMACS is needed to avoid being overwritten by the make variable EMACS in Makefile.config For what it's worth, the value of emacs is chosen at the time tmp.emacs/run_emacs is created, so is fixed for all subtests.
* | test: Updated the expected output to match the newly enabled text/plain hooks.Gravatar David Edmondson2011-12-28
| |
* | test: emacs: test notmuch-wash-subject-to-* functionsGravatar Jani Nikula2011-12-28
|/ | | | Signed-off-by: Jani Nikula <jani@nikula.org>
* test: add test for `notmuch-hello-refresh-hook'Gravatar Dmitry Kurochkin2011-12-22
| | | | | | | | Test that `notmuch-hello-refresh-hook' is called once when `notmuch-hello' is called and twice when calling `notmuch-hello-update' after that. The tests are very similar to tests for `notmuch-hello-mode-hook'.
* test: add general Emacs hook counterGravatar Dmitry Kurochkin2011-12-22
| | | | | Replace `notmuch-hello-mode-hook-counter' with general `hook-counter' and `add-hook-counter' functions to allow counting calls for any hook.
* emacs: do not call `notmuch-hello-mode' on updateGravatar Dmitry Kurochkin2011-12-20
| | | | | | | | | | | `notmuch-hello' should call `notmuch-hello-mode' function only when run for the first time. But before the change, `notmuch-hello' used `kill-all-local-variables' to remove editable widgets fields. This caused the major mode to be reset, and `notmuch-hello-mode' to be called every time. The patch manually deletes all editable widget fields and removes `kill-all-local-variables' call.
* test: add broken test for `notmuch-hello-mode-hook' called during updateGravatar Dmitry Kurochkin2011-12-20
| | | | | Test that `notmuch-hello-mode-hook' is not called during `notmuch-hello' buffer updates. The test is currently broken.
* test: add test for `notmuch-hello-mode-hook'Gravatar Dmitry Kurochkin2011-12-20
| | | | | Test that `notmuch-hello-mode-hook' is called once when `notmuch-hello' function is called.
* test: add `notmuch-hello-mode-hook-counter'Gravatar Dmitry Kurochkin2011-12-20
| | | | | | | Add `notmuch-hello-mode-hook-counter' hook to count how many times `notmuch-hello-mode-hook' was called. The counter function increments `notmuch-hello-mode-hook-counter' variable value if it is bount, otherwise it does nothing.
* test: optionally print subtest numberGravatar David Bremner2011-12-18
| | | | | | | The idea is that $test_count could be used in tests to label intermediate files. The output enabled by this patch (and --debug) helps figure out which OUTPUT.nn file belongs to which test in case several subtests write to OUTPUT.$test_count
* Fix build with binutils-2.22Gravatar Thomas Jost2011-12-17
| | | | | | | | | | | | | | | | | | | binutils-2.22 changes the behaviour of ld by defaulting to --no-copy-dt-needed-entries, which means that required objects/libs are not "indirectly" linked through intermediate objects/libs anymore. As a consequence, when using binutils-2.22, building symbol-test fails with the following error: /usr/bin/ld: test/symbol-test.o: undefined reference to symbol 'std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()@@GLIBCXX_3.4' /usr/bin/ld: note: 'std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()@@GLIBCXX_3.4' is defined in DSO /usr/lib/libstdc++.so.6 so try adding it to the linker command line /usr/lib/libstdc++.so.6: could not read symbols: Invalid operation An easy fix is to link using CXX instead of CC.
* Revert "test: add emacs test for hiding a message following an HTML part"Gravatar David Bremner2011-12-15
| | | | | | | | | | | This reverts commit c6a3a768fef9f59f483af04f4418d350efc27968. This test is unreliable, showing BROKEN in some environments and FIXED in others. The confusion seems to outweigh the benefits, for now. Conflicts: test/emacs
* test: add arg-test to .gitignoreGravatar David Bremner2011-12-12
| | | | This should have been done when the binary was added, oops.
* test: add tests for hooksGravatar Jani Nikula2011-12-11
| | | | Signed-off-by: Jani Nikula <jani@nikula.org>
* test: use python2 instead of python if availableGravatar Thomas Jost2011-12-11
| | | | | | Some distros (Arch Linux) ship Python as python2 and Python 3 as python. Checking for python2 is necessary for the Python tests to work on these platforms.
* test: add a function to run Python testsGravatar Thomas Jost2011-12-11
| | | | | | | | | | | | | The new test_python() function makes writing Python tests a little easier: - it sets the environment variables as needed - it redirects stdout to the OUTPUT file (like test_emacs()). This commit also declares python as an external prereq. The stdout redirection is required to avoid trouble when running commands like "python 'script' | sort > OUTPUT": in such a case, any error due to a missing external prereq would be "swallowed" by sort, resulting to a failed test instead of a skipped one.
* test: cleanup gdb external dependency in atomicity testsGravatar Dmitry Kurochkin2011-12-11
| | | | | Change atomicity tests to use the new external binary dependencies. This simplifies the code and makes output consistent.
* test: tests for command-line-arguments.cGravatar David Bremner2011-12-08
| | | | | This was needed because no current notmuch code exercises the NOTMUCH_OPT_STRING style arguments.
* test: date_relative in notmuch search json outputGravatar pazz2011-12-07
| | | | | | | | expect the date_relative field for thread entries in notmuch search's json output note from Commiter: we don't have to worry about the date changing because the date in question is more than 180 days old.
* emacs: do not call notmuch show for non-inlinable partsGravatar Dmitry Kurochkin2011-12-07
| | | | | | | | | | | | | | Before the change, there was a workaround to avoid notmuch show calls for parts with application/* Content-Type. But non-inlinable parts are not limited to this Content-Type (e.g. mp3 files have audio/mpeg Content-Type and are not inlinable). For such parts `notmuch-show-insert-part-*/*' handler is called which unconditionally fetches contents for all parts. The patch moves content fetching from `notmuch-show-insert-part-*/*' to `notmuch-show-mm-display-part-inline' function after MIME inlinable checks are done to avoid useless notmuch show calls. The application/* hack is no longer needed and removed.
* test: check that Emacs UI does not call notmuch for non-inlinable partsGravatar Dmitry Kurochkin2011-12-07
| | | | | | | | | | The patch adds two new test cases: * Do not call notmuch for non-inlinable application/mpeg parts * Do not call notmuch for non-inlinable audio/mpeg parts The application/mpeg test passes thanks to a workaround for application/* Content-Types. The audio/mpeg is currently broken.
* test: add functions to count how much times notmuch was calledGravatar Dmitry Kurochkin2011-12-07
| | | | | | | | | | | | | | | | The patch adds two auxiliary functions and a variable: notmuch_counter_reset $notmuch_counter_command notmuch_counter_value They allow to count how many times notmuch binary is called. notmuch_counter_reset() function generates a script that counts how many times it is called and resets the counter to zero. The function sets $notmuch_counter_command variable to the path to the generated script that should be called instead of notmuch to do the counting. The notmuch_counter_value() function returns the current counter value.
* test/symbol-hiding: compare exported symbols with existing oneGravatar David Bremner2011-12-07
| | | | | We assume that any symbol starting with notmuch_ in lib/*.o should be exported, and that only those symbols should be exported.
* test/symbol-hiding: add some whitespace between testsGravatar David Bremner2011-12-07
| | | | This is in preparation for adding a third test to this file
* Merge branch 'release'Gravatar David Bremner2011-12-06
|\ | | | | | | | | | | | | Conflicts: NEWS Conflicts resolved by inserting the 0.10.2 stanza before 0.11
* | test: add test-binaries targetGravatar David Bremner2011-12-06
| | | | | | | | | | The goal here is to have a simple way of making sure all of the binaries needed to run tests are available.
| * test/python: set LD_LIBRARY_PATH and PYTHONPATH to use local notmuchGravatar David Bremner2011-12-05
| | | | | | | | | | Possibly this should be factored out into some kind of "run_python" function.
| * test: add tests for python bindingsGravatar David Bremner2011-12-05
| | | | | | | | | | | | We start modestly, with a (slightly modified) test case from Kazuo Teramoto. Originally it just made sure the bindings didn't crash; here we check that by comparing the output with that of notmuch search.
* | test: fix error messages for missing binary dependenciesGravatar Dmitry Kurochkin2011-11-30
| | | | | | | | | | | | | | The fake missing binary functions check if the binary has already be added to the diagnostic message to avoid duplicates. Unfortunately, this check was buggy because the message string does not have the trailing space.
* | test: fix spurious output from missing external binaries functionsGravatar Dmitry Kurochkin2011-11-30
| | | | | | | | | | The grep(1) command used in the fake binary functions was missing the quiet option.
* | test: add missing escape backslash in test_declare_external_prereq()Gravatar Dmitry Kurochkin2011-11-30
| |
* | test: fix test_require_external_prereq()Gravatar Dmitry Kurochkin2011-11-30
| | | | | | | | | | | | test_missing_external_prereq_${binary}_ variable indicates that the binary is missing. It must be set in test_declare_external_prereq() outside of the fake $binary() function.
* | test: fix "Stashing in notmuch-search" test when emacs is not availableGravatar Dmitry Kurochkin2011-11-27
| | | | | | | | | | | | If emacs is not available, test_expect_equal would be called with only one argument. The patch fixes this by quoting the (possibly empty) $(cat OUTPUT) argument.