<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/test/T560-lib-error.sh, branch 0.28.3</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=0.28.3</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=0.28.3'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2017-10-20T22:52:49Z</updated>
<entry>
<title>test: use $(dirname "$0") for sourcing test-lib.sh</title>
<updated>2017-10-20T22:52:49Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani@nikula.org</email>
</author>
<published>2017-09-25T20:38:19Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=a863de1e43ee34f6f5794a2759fdceb287e851aa'/>
<id>urn:sha1:a863de1e43ee34f6f5794a2759fdceb287e851aa</id>
<content type='text'>
Don't assume the tests are always run from within the source tree.
</content>
</entry>
<entry>
<title>database: add n_d_index_file (deprecates n_d_add_message)</title>
<updated>2017-08-23T10:38:37Z</updated>
<author>
<name>Daniel Kahn Gillmor</name>
<email>dkg@fifthhorseman.net</email>
</author>
<published>2017-08-17T23:14:25Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=b10ce6bc23002d48916b1b2f375480e7540e3164'/>
<id>urn:sha1:b10ce6bc23002d48916b1b2f375480e7540e3164</id>
<content type='text'>
We need a way to pass parameters to the indexing functionality on the
first index, not just on reindexing.  The obvious place is in
notmuch_database_add_message.  But since modifying the argument list
would break both API and ABI, we needed a new name.

I considered notmuch_database_add_message_with_params(), but the
functionality we're talking about doesn't always add a message.  It
tries to index a specific file, possibly adding a message, but
possibly doing other things, like adding terms to an existing message,
or failing to deal with message objects entirely (e.g. because the
file didn't contain a message).

So i chose the function name notmuch_database_index_file.

I confess i'm a little concerned about confusing future notmuch
developers with the new name, since we already have a private
_notmuch_message_index_file function, and the two do rather different
things.  But i think the added clarity for people linking against the
future libnotmuch and the capacity for using index parameters makes
this a worthwhile tradeoff.  (that said, if anyone has another name
that they strongly prefer, i'd be happy to go with it)

This changeset also adjusts the tests so that we test whether the new,
preferred function returns bad values (since the deprecated function
just calls the new one).

We can keep the deprecated n_d_add_message function around as long as
we like, but at the next place where we're forced to break API or ABI
we can probably choose to drop the name relatively safely.

NOTE: there is probably more cleanup to do in the ruby and go bindings
to complete the deprecation directly.  I don't know those languages
well enough to attempt a fix; i don't know how to test them; and i
don't know the culture around those languages about API additions or
deprecations.
</content>
</entry>
<entry>
<title>lib: replace deprecated n_q_count_messages with status returning version</title>
<updated>2017-03-22T11:35:07Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2017-02-26T21:21:34Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=5ce8e0b11b40f733e6231d2067764e76717a341a'/>
<id>urn:sha1:5ce8e0b11b40f733e6231d2067764e76717a341a</id>
<content type='text'>
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
</content>
</entry>
<entry>
<title>lib: replace deprecated n_q_search_messages with status returning version</title>
<updated>2017-03-22T11:35:07Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2017-02-26T21:21:32Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=86cbd215eb67d7b996c977352a50e70c101cb641'/>
<id>urn:sha1:86cbd215eb67d7b996c977352a50e70c101cb641</id>
<content type='text'>
This function was deprecated in notmuch 0.21.  We re-use the name for
a status returning version, and deprecate the _st name.
</content>
</entry>
<entry>
<title>test: require test_begin_subtest before test_expect_success</title>
<updated>2017-03-09T13:01:21Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani@nikula.org</email>
</author>
<published>2017-02-26T13:43:00Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=d0cd253b37646d9364d046e1d3edb022a58c105a'/>
<id>urn:sha1:d0cd253b37646d9364d046e1d3edb022a58c105a</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>test: cope with glass backend file naming variations</title>
<updated>2016-04-12T23:21:09Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2016-04-09T01:49:50Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=e311aad182326a1dcb0f8512e10b0e0f0faa9e2c'/>
<id>urn:sha1:e311aad182326a1dcb0f8512e10b0e0f0faa9e2c</id>
<content type='text'>
In several places in the test suite we intentionally corrupt the Xapian
database in order to test error handling. This corruption is specific to
the on-disk organization of the database, and that changed with the
glass backend. We use the previously computed default backend to make
the tests adapt to changing names.
</content>
</entry>
<entry>
<title>test: improve error handling in lib-error tests</title>
<updated>2016-04-12T23:04:03Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2016-04-09T01:49:47Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=45df509cb6fd642bc5895f2c7869a354c1255f4b'/>
<id>urn:sha1:45df509cb6fd642bc5895f2c7869a354c1255f4b</id>
<content type='text'>
There is at least one bug fixed here (missing parameter to printf), even
if exiting via segfault is considered OK.
</content>
</entry>
<entry>
<title>test: refactor directory name sanitization</title>
<updated>2016-01-27T02:50:58Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2016-01-23T12:49:26Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=12534d5c4b02498173b0c63d063ae0a3c845b957'/>
<id>urn:sha1:12534d5c4b02498173b0c63d063ae0a3c845b957</id>
<content type='text'>
test_C and notmuch_search_files_sanitize were giving different output on
the same path, which is not technically wrong, but slightly
confusing.
</content>
</entry>
<entry>
<title>test: move backup_database and restore_database to library</title>
<updated>2015-09-04T11:22:42Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2015-06-07T15:01:59Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=9ee29ad6f0805dc55e63f8a04a68a1f55d0c382b'/>
<id>urn:sha1:9ee29ad6f0805dc55e63f8a04a68a1f55d0c382b</id>
<content type='text'>
The plan is to re-use them in testing the same errors from the CLI
</content>
</entry>
<entry>
<title>test: make script exit (1) if it "fails" to source (.) a file</title>
<updated>2015-08-07T19:56:39Z</updated>
<author>
<name>Tomi Ollila</name>
<email>tomi.ollila@iki.fi</email>
</author>
<published>2015-08-06T09:13:36Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=02a2eeb427d6b424029f6e5e5ddad4c6ec987741'/>
<id>urn:sha1:02a2eeb427d6b424029f6e5e5ddad4c6ec987741</id>
<content type='text'>
The files (test) scripts source (with builtin command `.`) provides
information which the scripts depend, and without the `source` to
succeed allowing script to continue may lead to dangerous situations
(e.g. rm -rf "${undefined_variable}"/*).

At the end of all source (.) lines construct ' || exit 1' was added;
In our case the script script will exit if it cannot find (or read) the
file to be sourced. Additionally script would also exits if the last
command of the sourced file exited nonzero.
</content>
</entry>
</feed>
