aboutsummaryrefslogtreecommitdiff
path: root/test/new
AgeCommit message (Collapse)Author
2014-01-13test: renamed test scripts to format T\d\d\d-name.shTomi Ollila
All test scripts to be executed are now named as T\d\d\d-name.sh, numers in increments of 10. This eases adding new tests and developers to see which are test scripts that are executed by test suite and in which order.
2013-12-28test: Fix transient error in 'new' testAustin Clements
This fixes a non-deterministic failure in "Ignore files and directories specified in new.ignore (multiple occurrences)". The test assumed that all directories would be scanned, even though nothing updated the mtime of ${MAIL_DIR}. It *usually* worked nevertheless because the tests run quickly enough that the directory mtime is usually the same as the current time, so notmuch new does not update the mtime in the database (because more changes could occur in the same second). However, when it occasionally did update the mtime in the database, the notmuch new call in this test would (correctly) skip "pass 2" of scanning ${MAIL_DIR}, causing it to skip the following expected lines: (D) add_files_recursive, pass 2: explicitly ignoring ${MAIL_DIR}/.git (D) add_files_recursive, pass 2: explicitly ignoring ${MAIL_DIR}/.ignored_hidden_file (D) add_files_recursive, pass 2: explicitly ignoring ${MAIL_DIR}/ignored_file This patch fixes this problem by touching ${MAIL_DIR} to ensure it gets scanned and by rearranging the test to ensure the directories are touched immediately before the main notmuch new call in the test.
2012-11-26new: Skip ignored broken symlinksAustin Clements
We now test for user ignore patterns before attempting to determine if a directory entry is itself a directory. As a result, we no longer abort for broken symlinks if the user has explicitly ignored them. This fixes the test added in the previous patch. It also slightly changes the debug output checked by another test of ignores.
2012-11-26test: Add a test for skipping ignored broken symlinksAustin Clements
Currently marked as broken because we abort on broken symlinks, even if they are in the ignore list.
2012-11-26lib: Reject multi-message mboxes and deprecate single-message mboxAustin Clements
Previously, we would treat multi-message mboxes as one giant email, which, besides the obvious incorrect indexing, often led to out-of-memory errors for archival mboxes. Now we explicitly reject multi-message mboxes. For historical reasons, we retain support for single-message mboxes, but official deprecate this behavior.
2012-11-26test: Test for ignoring multi-message mboxAustin Clements
This test is currently broken. Note that its brokenness cascades and causes the next test to fail as well (because notmuch incorrectly indexes the mbox file).
2012-11-26test: Test notmuch new for single-message mboxAustin Clements
We support this for historical reasons.
2012-10-22test: new: Fix intermittent test failures with --debugEthan Glasser-Camp
Although messages are created in a particular order, it seems that when they are created on a tmpfs, they do not always come back in the same order, leading to the same files being ignored but being output in a different order. This causes the test to fail because the outputs being compared are the same. Fix the failures by sorting the output of notmuch --debug and comparing this to a hand-sorted version of its output. Signed-off-by: Ethan Glasser-Camp <ethan@betacantrips.com>
2012-10-20test: another test wrt ignoring user-specified files and directoriesPieter Praet
Demonstrates that *every* file/directory which matches one of the values in 'new.ignore' will be ignored, independent of its depth/location in the mail store. Signed-off-by: Ethan Glasser-Camp <ethan@betacantrips.com>
2012-05-24new: Centralize file type stat-ing logicAustin Clements
This moves our logic to get a file's type into one function. This has several benefits: we can support OSes and file systems that do not provide dirent.d_type or always return DT_UNKNOWN, complex symlink-handling logic has been replaced by a simple stat fall-through in one place, and the error message for un-stat-able file is more accurate (previously, the error always mentioned directories, even though a broken symlink is not a directory).
2012-05-24test: Test notmuch new with a broken symlinkAustin Clements
2012-02-25test: replace occurrences of $PWD with vars that are more stablePieter Praet
Thanks to Dmitry Kurochkin <dmitry.kurochkin@gmail.com> for pointing this out: id:"87d39ymyb4.fsf@gmail.com"
2012-02-17add support for user-specified files & directories to ignoreTomi Ollila
A new configuration key 'new.ignore' is used to determine which files and directories user wants not to be scanned as new mails. Mark the corresponding test as no longer broken. This work merges my previous attempts and Andreas Amann's work in id:"ylp7hi23mw8.fsf@tyndall.ie"
2012-02-17test: add tests wrt ignoring user-specified files and directoriesTomi Ollila
Files and directories which are specified in 'new.ignore' in the config file shouldn't be indexed nor reported by `notmuch new'. This is basically Pieter's work with Austin's comments addressed.
2011-06-29test: Nix increment_mtime.Austin Clements
With the fix for the mtime race, this workaround is no longer necessary.
2011-05-27test: change "#!/bin/bash" to "#!/usr/bin/env bash" enhances portabilityJoel Borggrén-Franck
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.
2010-09-20test: Remove useless NOTMUCH variable (in favor of simply "notmuch")Carl Worth
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.
2010-09-17test: Rename all tests to get rid of the ugly numbers in file names.Carl Worth
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.