aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
Commit message (Collapse)AuthorAge
* 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: 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.
* test: check if emacs is available in the beginning of test_emacsGravatar Dmitry Kurochkin2011-11-27
| | | | Unfortunately, this is needed to avoid the emacs waiting loop.
* test: add function to explicitly check for external dependenciesGravatar Dmitry Kurochkin2011-11-27
| | | | Useful when binary is called indirectly (e.g. from emacs).
* test: declare external dependencies for the testsGravatar Dmitry Kurochkin2011-11-27
| | | | That are: dtach(1), emacs(1), emacsclient(1), gdb(1) and gpg(1).
* test: skip all subtests if external dependencies are missing during initGravatar Dmitry Kurochkin2011-11-27
| | | | | | | | | | Some tests (e.g. crypto) do a common initialization required for all subtests. The patch adds a check for missing external dependencies during this initialization. If any prerequisites are missing, all subtests are skipped. The check is run on the first call of test_reset_state_ function, so no changes for the tests are needed.
* test: fix "skipping test" verbose outputGravatar Dmitry Kurochkin2011-11-27
|
* test: add support for external executable dependenciesGravatar Dmitry Kurochkin2011-11-27
| | | | | | | | | | | | | | | There is existing support for general prerequisites in the test suite. But it is not very convenient to use: every test case has to keep track for it's dependencies and they have to be explicitly listed. The patch aims to add better support for a particular type of external dependencies: external executables. The main idea is to replace missing external binaries with shell functions that have the same name. These functions always fail and keep track of missing dependencies for a subtest. The result reporting functions later can check that an external binaries are missing and correctly report SKIP result instead of FAIL. The primary benefit is that the test cases do not need to declare their dependencies or be changed in any way.
* test: add test state reset to test_expect_* functions that did not have itGravatar Dmitry Kurochkin2011-11-27
|
* test: set EMACS_SERVER variable only after dtach(1) was successfully startedGravatar Dmitry Kurochkin2011-11-27
| | | | | Otherwise, we can set the EMACS_SERVER and return with an error. And subsequent calls to test_emacs would assume that emacs server is running.
* test: move subtest variables reset into a dedicated functionGravatar Dmitry Kurochkin2011-11-27
| | | | | Currently, there is only one such variable test_subtest_known_broken_. But more will be added in the future.
* Build symbol-test with make instead of hardcoding in symbol-hiding.Gravatar Amadeusz Żołnowski2011-11-27
| | | | | | If symbol-test is built in symbol-hiding with hardcoded g++ invokation, it's not so easy to pass $(srcdir) which is required to find notmuch.h when srcdir and builddir are separate directories.
* Merge branch 'release'Gravatar David Bremner2011-11-26
|\
* | build system: clean up object files in ./test and ./utilGravatar David Bremner2011-11-26
| |
* | Whitespaces cleanup.Gravatar Amadeusz Żołnowski2011-11-26
| |
* | Fix warnings for test/symbol-test.cc.Gravatar Amadeusz Żołnowski2011-11-26
| |
* | test: cleanup basic testsGravatar Dmitry Kurochkin2011-11-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Basic test 'Ensure that all available tests will be run by notmuch-test' compares all tests that are run with listing of test/ directory. There is a growing list of exceptions for files and directories which located in the test/ directory but are not tests. Moreover some (probably buggy) tests do create files in the the test/ directory which may be left behind in case of failure. This makes the basic test fail. The patch changes the test to look only for regular executable files. This makes the exception list much smaller. And since no tests should create executables in the test/ directory (if there are, they should be fixed), the basic test should not be affected by failed or interrupted tests.
* | test: fix sed error in basic testsGravatar Dmitry Kurochkin2011-11-26
| | | | | | | | | | | | | | | | | | | | | | | | | | The error is easy to miss, because the test passes and stderr is not printed. But if you run basic tests in verbose mode (./basic --verbose), you get: sed: can't read notmuch-test: No such file or directory The issue is that sed command is given two files: notmuch-test and $TEST_DIRECTORY/notmuch-test. And there is no notmuch-test file in the current directory (test/tmp.basic/). The patch just removes the non-existing file from the sed command.
* | test: remove executable permissions from test-lib.shGravatar Dmitry Kurochkin2011-11-26
| | | | | | | | It is not supposed to be run, only sourced.
* | emacs: test notmuch show with fourfold message indentationGravatar Gregor Zattler2011-11-25
| | | | | | | | | | | | | | Previous behaviour was to indent messages in a thread according to depth by one space per level. This commit tests if setting notmuch-indent-messages-width to `4' provides a message thread with four spaces of indentation thread depth.
* | emacs: test: notmuch show without indentationGravatar Gregor Zattler2011-11-25
| | | | | | | | | | | | | | | | | | Previous behaviour was to indent messages in a thread according to depth by one space per level. In id:1311028119-50637-1-git-send-email-fgeller@gmail.com Felix Geller proposed a patch in order to turn indentation off. This commit tests if instead setting notmuch-indent-messages-width to `0' does turn off indentation.
* | emacs: test notmuch-indent-messages-width defaultGravatar Gregor Zattler2011-11-25
| | | | | | | | | | | | | | | | Previous behaviour was to indent messages in a thread according to depth by one space per level. This is still the case with notmuch-indent-messages-width default value `1'. This test succeeds if output with default value is same as in "Basic notmuch-show view in emacs".
| * test: add simple tests for online helpGravatar David Bremner2011-11-25
| | | | | | | | Nothing fancy, but we can at least detect segmentation faults.
* | fix a double // to single /Gravatar Florian Friesdorf2011-11-20
| |
* | test: make all tests terminable with Ctrl-cGravatar Tomi Ollila2011-11-18
| | | | | | | | | | | | | | Some tests don't break when HUP signal is sent tho those (by pressing ctrl-c on the terminal). Therefore, the top-level test script catches the HUP and sends TERM signal to the started test script.
* | test: emacs: tidy up "Stashing in notmuch-show" testGravatar Pieter Praet2011-11-18
| | | | | | | | | | Merge expected output into the actual test, so we can verify the stashed filename using ${gen_msg_filename} instead of doing sed tricks.
* | test: attempt to send QUIT to smtp-dummy in case mail send failedGravatar Tomi Ollila2011-11-18
|/ | | | | | If mail sending from emacs fails before it has chance to connect to the smtp-dummy mail server, the opportunistic QUIT message sending makes smtp-dummy to exit.
* test: create dtach's session socket in $TEST_TMPDIRGravatar Tomi Ollila2011-11-17
| | | | | | | | Due to 108-character limit in unix domain socket path this change is required; it is more probable that length of ${TMPDIR:-/tmp} is shorter than length of path to the current directory of notmuch test source directory. One can expect to create reasonable-length unix domain sockets wherever $TMPDIR points to.
* test: create TEST_TMPDIR for holding temporary filesGravatar Tomi Ollila2011-11-17
| | | | | | The TEST_TMPDIR if first needed to hold dtach's socket (due to 108-character limit in socket file names). Later it can be used to hold other temporary files; directory deleted at exit.
* test: add tests for notmuch search --offset and --limitGravatar Jani Nikula2011-11-15
| | | | Signed-off-by: Jani Nikula <jani@nikula.org>
* test: add tests for notmuch countGravatar Jani Nikula2011-11-15
| | | | Signed-off-by: Jani Nikula <jani@nikula.org>
* test: Add a test script for "notmuch tag"Gravatar Austin Clements2011-11-14
|
* test/atomicity: change shebang to '#!/usr/bin/env bash'Gravatar Tomi Ollila2011-11-14
|
* test: make smtp-dummy work with Emacs 24Gravatar Thomas Jost2011-11-13
| | | | | In Emacs 24, a space is expected after a SMTP response code. If we don't respect that, smtpmail-send-it will wait forever.
* test: do not hide test_emacs errorsGravatar Dmitry Kurochkin2011-11-13
| | | | | | | | Do not redirect test_emacs stderr to /dev/null. Test_emacs uses emacsclient(1) now and it does not print unwanted messages (like those from `message') to stderr. But it does print useful errors, e.g. when emacs server connection fails, given expression is not valid or undefined function is called.
* exec emacs at the end of run_emacs scriptGravatar Tomi Ollila2011-11-12
| | | | | In the last line of run_emacs, exec the emacs process. With one fork less the process list is (also) neater.
* test: stashing in notmuch-{show,search}Gravatar Pieter Praet2011-11-12
| | | | | | Should provide full test coverage of the stashing feature. Signed-off-by: Pieter Praet <pieter@praet.org>
* emacs: add invisible space after the search widget field in notmuch-helloGravatar Dmitry Kurochkin2011-11-12
| | | | | | | | | It is very convenient when C-e (bound to `widget-end-of-line') ignores trailing spaces inside the search widget. But it only does so if a widget is not followed by a newline (that is why it works in the saved search widgets). The patch just adds an invisible space after the search widget to get the desirable behavior of `widget-end-of-line'. The extra space is also added to expected results of emacs tests.
* smtp-dummy: clear sockaddr_in structure before use in bind()Gravatar Tomi Ollila2011-11-12
| | | | | Any junk bytes in sockaddr_in structure before passing that to bind() system call may cause problems.
* test: use dtach(1) instead of screen(1) in emacs testsGravatar Tomi Ollila2011-11-11
| | | | | dtach is simpler than screen and is not setuid/setgid program so TMPDIR does not get cleared by dynamic loader when executed
* emacs: improve hidden signatures handling in notmuch-show-advance-and-archiveGravatar Dmitry Kurochkin2011-11-07
| | | | | | | Use `previous-single-char-property-change' instead of going through each character by hand and testing it's visibility. This fixes `notmuch-show-advance-and-archive' to work for the last message in thread with hidden signature.
* test: `notmuch-show-advance-and-archive' with invisible signatureGravatar Dmitry Kurochkin2011-11-07
| | | | | Add Emacs test to check that `notmuch-show-advance-and-archive' works for the last message in thread with invisible signature.
* test: do not set frame width in emacsGravatar Dmitry Kurochkin2011-11-05
| | | | | No need for `set-frame-width' in emacs tests since it runs in screen now.
* test: avoid using screen(1) configuration filesGravatar Dmitry Kurochkin2011-11-05
| | | | | | Set SCREENRC and SYSSCREENRC environment variables to "/dev/null" as suggested by Jim Paris to avoid potential problems with screen(1) configuration files.
* test: run emacs inside screenGravatar Dmitry Kurochkin2011-11-05
| | | | | | | | | | | | | Before the change, emacs run in daemon mode without any visible buffers. Turns out that this affects emacs behavior in some cases. In particular, `window-end' function returns `point-max' instead of the last visible position. That makes it hard or impossible to implement some tests. The patch runs emacs in a detached screen(1) session. So that it works exactly as if it has a visible window. Note: screen terminates when emacs exits. So the patch does not introduce new "running processes left behind" issues.
* test: json show format of message with inline attachment with filenameGravatar Dmitry Kurochkin2011-11-05
| | | | | The patch adds a test to check that json show format includes filenames for attachments with inline disposition.