| Commit message (Collapse) | Author | Age |
|
|
|
|
| |
Construct as much of the CLEAN list from TEST_BINARIES as possible,
rather than duplicating this information by hand.
|
|
|
|
|
|
|
|
| |
Searching by Message-Id no longer works via the old mail-archive.com
API, though I have contacted them in hopes that they restore it to
prevent dead links. Anyway, the new API is cleaner.
Acked-by: Austin Clements <amdragon@MIT.EDU>
|
|
|
|
|
| |
This does not cover all the possible paths notmuch new could output
stuff, but it's better than nothing.
|
|
|
|
| |
We want to return an error status, not 0 or (worse) segfault.
|
|
|
|
|
| |
This test catches a segfault on a syntactically invalid query. It also
catches a problem with my initial fix, which still returned 0.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Script `notmuch-test` expects the results file have T\d\d\d- part
intact so the results files (and some test output files) are now
name as such.
Without this change `notmuch-test` will exit in case the test
script it was executing exited with nonzero value.
The T\d\d\d- part is dropped in new variable $this_test_bare which is
used in progress informational messages and when loading .el files in
emacs tests (whenever $this_test_bare.el exists).
|
|
|
|
|
|
|
|
| |
If there is a syntax error in the emacs test library, it causes other
tests to hang or crash without a useful error message.
This test could be eliminated if the error reporting for emacs tests
was somehow improved.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
When naming test scripts in format 'T\d\d\d-name.sh' the list of
tests to run are created dynamically. This makes test
'Ensure that all available tests will be run by notmuch-test'
in test/basic obsolete.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously the tags on each line in tree view were separarted by ", "
not just " ". This is different from show and search views.
This patch removes this comma. This is a large patch as essentially
every line of each of the expected outputs in the tree tests needs
updating.
Apart from aesthetic reasons this simplifies the switch to
notmuch-tag-format-tags in the next patch.
|
|\
| |
| |
| | |
uploaded to Debian unstable
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In some environments (at least Hurd), process-attributes is
unimplimented and always returns nil. This ends up causing test
failures (see e.g. id:87a9ffofsc.fsf@zancas.localnet).
Historically and according to POSIX 1003.1-2001, a signal of 0 can be
used to check the validity of a pid. This seems less heinous than
parsing the output of ps(1).
|
| |
| |
| |
| | |
Don't synchronize maildir flags if the user doesn't want it.
|
| |
| |
| |
| | |
Known broken, notmuch insert does not respect the config option.
|
| |
| |
| |
| |
| | |
Some no longer needed traces of pick remain in the emacs-tree
test. Remove these.
|
|\|
| |
| |
| | |
notmuch 0.17~rc4 release
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| | |
There is an obscure bug in notmuch-hello that very occasionally causes
emacs_deliver_message to fail. Since it it doesn't serve any actual
purpose in the function we delete it, and leave tracking down the the
bug for another day.
|
| |
| |
| |
| |
| |
| |
| | |
Most of the tests previously using emacs_deliver_message do not use
the actual transmitted message, so we replace it with a simpler (and
presumably more reliable function) that only saves (and indexes) an
fcc copy of the message.
|
| |
| |
| |
| |
| |
| | |
When NOTMUCH_TEST_QUIET environment variable is set to non-null value
messages when new test script starts and when test PASSes are disabled.
This eases picking the cases when tests FAIL (as those are still printed).
|
| |
| |
| |
| |
| |
| | |
In preparation for quiet mode print empty line before writing the
test description. This is done now in function designed for it --
it will also be called when test fails.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
test-lib.sh sometimes did equivalent of `basename "$0" .sh`, sometimes
skipping the basename part and sometimes .sh part. This worked as
we never had path components in $0 (more than ./) nor .sh ending.
Now the equivalent of `basename "$0" .sh` is done once and used
everywhere. In the future we may have .sh suffix in test names
-- removing those is a good idea.
|
| |
| |
| |
| |
| |
| | |
The choice of decreasing timestamps is a hack which reduces the number
of existing tests which fail. This can be changed to increasing
if/when somebody wants update another 47 tests.
|
| |
| |
| |
| |
| |
| |
| | |
add a new function notmuch_date_sanitize for rfc822-ish things. Add
date sanitization to notmuch_show_sanitize_all and use it more places.
This is all in aid of a transition to unique timestamps on messages.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Eventually we want test messages to have distinct dates to avoid
reproducability problems. This sanitization will prevent some test
failures when that change is made.
Replace the use of a local function in maildir-sync with
notmuch_json_show_sanitize
|
|/
|
|
|
| |
This makes the tests more robust against changes in the
sanitization rules.
|
|
|
|
|
|
| |
This was causing test failures because version strings varied in
length between GNU/Linux and GNU/KFreeBSD. One can also imagine
different versions of gnupg causing the same failure.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When executed command line is written to *Notmuch errors* buffer,
shell-quote-argument will backslash-escape any char that is not in
"POSIX filename characters" (i.e. matching "[^-0-9a-zA-Z_./\n]").
Currently in two emacs tests shell has expanded $PWD as part of
emacs variable, which will later be fed to #'shell-quote-argument
and finally written to ERROR file. If $PWD contained non-POSIX
filename characters, data in ERROR file will not match $PWD when
later comparing in shell. Therefore, in these two particular cases
the escaped $PWD is replaced with YYY in ERROR file and expected
content is adjusted accordingly.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes races in thread-local and global tagging in notmuch-search
(e.g., "+", "-", "a", "*", etc.). Previously, these would modify tags
of new messages that arrived after the search. Now they only operate
on the messages that were in the threads when the search was
performed. This prevents surprises like archiving messages that
arrived in a thread after the search results were shown.
This eliminates `notmuch-search-find-thread-id-region(-search)'
because these functions strongly encouraged racy usage.
This fixes the two broken tests added by the previous patch.
|
|
|
|
|
|
| |
These tests check that both thread-local and global search tagging
operations are race-free. They are currently known-broken because
they aren't race-free.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These queries will match exactly the set of messages currently in the
thread, even if more messages later arrive. Two queries are provided:
one for matched messages and one for unmatched messages.
This can be used to fix race conditions with tagging threads from
search results. While tagging based on a thread: query can affect
messages that arrived after the search, tagging based on stable
queries affects only the messages the user was shown in the search UI.
Since we want clients to be able to depend on the presence of these
queries, this ushers in schema version 2.
|
|
|
|
|
|
| |
(Unfortunately, it's difficult to first demonstrate this problem with
a known-broken test because modern Linux kernels have argument length
limits in the megabytes, which makes Emacs really slow!)
|
|
|
|
|
| |
The first subprocess error exit code test assumed the *Notmuch errors*
buffer would be empty. Rather than assuming, make it so.
|
|
|
|
|
| |
Now tree is included by default we don't need to "require it" in the
test.
|
|
|
|
| |
Now the test is in mainline we can remove the check that emacs exists.
|
|
|
|
|
| |
We move the emacs-tree test and associated files into the main test
directory and add the test to the list in notmuch-test.
|
|
|
|
|
| |
It's the user's decision. The recommended way is to do a database dump
anyway. Clean up the relevant printfs too.
|
|
|
|
|
|
| |
It was looking in completely the wrong place for the backup and the
(test) xapian database. Unfortunately test_begin_subtest hides the
relevant errors.
|
|
|
|
| |
Signed-off-by: Ben Gamari <bgamari.foss@gmail.com>
|
|
|
|
|
|
|
|
|
| |
Currently notmuch-show looks at the prefix-arg directly via
current-prefix-arg. This changes it to use the interactive
specification.
One test (for elide-toggle functionality) set the prefix arg
directly. Update this test to set the new argument directly.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
One test (reply to encrypted message in the crypto test) recently
started failing on some systems. The failure I saw were two extra
lines of the form
<87d2nbc5xg.fsf@host.i-did-not-set--mail-host-address--so-tickle-me>
The test pipes the output through
grep -v -e '^In-Reply-To:' -e '^References:'
which would normally these two ids but it does not, in this case,
because they are so long they get put on a separate line in the output.
To fix this we set mail-host-address for emacs deliver. example.com
seems a sensible address to use. This is short enough that we don't
get the line breaks above and the tests then all pass.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As explained by Jeffrey Stedfast, the author of GMime, quoted in [1]:
> Passing the GMIME_ENABLE_RFC2047_WORKAROUNDS flag to g_mime_init()
> *should* solve the decoding problem mentioned in the thread. This
> flag should be safe to pass into g_mime_init() without any bad side
> effects and my unit tests do test that code-path.
The thread being referred to is [2].
[1] id:87bo56viyo.fsf@nikula.org
[2] id:08cb1dcd-c5db-4e33-8b09-7730cb3d59a2@gmail.com
|
|
|
|
|
|
| |
Some common broken RFC 2047 encodings that we currently let gmime
parse strictly. We could tell gmime to be forgiving in what it accepts
as RFC 2047 encoding, making these tests pass.
|
|
|
|
|
|
|
|
|
|
|
| |
When 'xpg_echo' bash shell option is unset (usually the default)
echo builtin does not expand backslash-escape sequences by default
(i.e. '\n' is echoed as '\n' instead of newline). Not all bash
installations have this feature we depend on activated by default.
Note that the feature is bash (and GNU /bin/echo) specific. It is used
as it is convenient. If portability is needed (elsewhere) use printf(1)
(also often available as a shell builtin).
|
|
|
|
|
|
|
|
| |
If any of the tests in our test system is not passing the execution
of the test suite completes with nonzero exit value.
It is better to rely on the exit value of the test system instead
of some arbitrary strings in test output (or use both).
|
|
|
|
|
| |
There isn't a reported issue this would fix. Spotted by reading the
test.
|
|
|
|
| |
Specifically test maildir flag syncing with insert.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
notmuch_message_tags_to_maildir_flags() unconditionally moves messages from
maildir directory "new/" to maildir directory "cur/", which makes messages lose
their "new" status in the MUA. However some users want to keep this "new"
status after, for instance, an auto-tagging of new messages.
However, as Austin mentioned and according to the maildir specification,
messages living in "new/" are not allowed to have flags, even if mutt allows it
to happen. For this reason, this patch prevents moving messages from "new/" to
"cur/", only if no flags have to be changed. It's hopefully enough to satisfy
mutt (and maybe other MUAs showing the "new" status) users checking the "new"
status.
Changelog:
* v2: Fix bool type as well as NULL returned despite having no errors (Austin
Clements)
* v4: Tag the related test (contributed by Michal Sojka) as working
Signed-off-by: Louis Rilling <l.rilling@av7.net>
[Condition for keeping messages in new/ was extended to satisfy all
tests from the previous patch. -Michal Sojka]
[Added by David Bremner, to keep the tests passing at each commit]
update insert tests for new maildir synchronization rules
As of id:1355952747-27350-4-git-send-email-sojkam1@fel.cvut.cz
we are more conservative about moving messages from ./new to ./cur.
This updates the insert tests to match
|
|
|
|
|
|
| |
As mentioned by Jani Nikula in id:87vcccp4y3.fsf@nikula.org, some cases
of maildir synchronization are not covered by our tests. Let's add the
missing tests.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some MUA's like mutt show the difference between "new" emails living in maildir
directory new/, and "old" emails living in maildir directory cur/. However
notmuch tag unconditionally moves selected messages from new/ to cur/, even if
no maildir synchronized tag is changed.
While maildir specification forbids messages with tags living in new/, there is
no need to move messages to cur/ when no maildir synchronized tag is changed.
Thus notmuch can remain transparent with respect to other MUA's.
[ Edited commit log to better describe the intended changes, and tag the
test as broken until the actual changes are implemented -- Louis Rilling ]
Signed-off-by: Louis Rilling <l.rilling@av7.net>
[ Converted to use test_subtest_known_broken, David Bremner ]
|