<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/test/test-lib.sh, branch 0.20</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=0.20</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=0.20'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2015-03-28T23:33:56Z</updated>
<entry>
<title>test: add support for compiling and running C snippets</title>
<updated>2015-03-28T23:33:56Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2015-03-14T08:02:03Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=1e69afe8af3512c45061cfde99c9f98e1f94e20c'/>
<id>urn:sha1:1e69afe8af3512c45061cfde99c9f98e1f94e20c</id>
<content type='text'>
This is to limit the copy-pasta involved in running C tests. I decided
to keep things simple and not try to provide an actual C skeleton.

The setting of LD_LIBRARY_PATH is to force using the built libnotmuch
rather than any potential system one.
</content>
</entry>
<entry>
<title>test: prepare test-lib.sh for possible test system debug session</title>
<updated>2015-01-19T07:15:39Z</updated>
<author>
<name>Tomi Ollila</name>
<email>tomi.ollila@iki.fi</email>
</author>
<published>2014-09-21T18:06:20Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=7fcd100a2f4fcc3762f2f73bcca3c30cc971b67a'/>
<id>urn:sha1:7fcd100a2f4fcc3762f2f73bcca3c30cc971b67a</id>
<content type='text'>
When something in tests fails one possibility to test is to run
the test script as `bash -x TXXX-testname.sh`. As stderr (fd 2) was
redirected to separate file during test execution also this set -x
(xtrace) output would also go there.
test-lib.sh saves the stderr to fd 7 from where it can be restored,
and bash has BASH_XTRACEFD variable, which is now given the same value
7, making bash to output all xtrade information (consistently) there.

This lib file used to save fd's 1 &amp; 2 to 6 &amp; 7 (respectively) in
test_begin_subtest(), but as those needs to be set *before* XTRACEFD
variable is set those are now saved at the beginning of the lib (once).
This is safe and simple thing to do.
To make xtrace output more verbose PS4 variable was set to contain the
source file, line number and if execution is in function, that function
name. Setting this variable has no effect when not xtracing.

As it is known that fd 6 is redirected stdout, printing status can now
use that fd, instead of saving stdout to fd 5 and use it.
</content>
</entry>
<entry>
<title>test-lib: Add dummy subject to force empty subject</title>
<updated>2015-01-17T12:49:05Z</updated>
<author>
<name>Jesse Rosenthal</name>
<email>jrosenthal@jhu.edu</email>
</author>
<published>2014-10-29T20:51:44Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=c0c007dd7f60977047e2d58ec9e3c10fc4ac1302'/>
<id>urn:sha1:c0c007dd7f60977047e2d58ec9e3c10fc4ac1302</id>
<content type='text'>
At the moment, the test-lib fills in any missing headers. This makes
it impossible to test our handling of empty subjects. This will
allow us to use a special dummy subject -- `@FORCE_EMPTY` -- to force
the subject to remain empty.
</content>
</entry>
<entry>
<title>Merge tag '0.18.2_rc1'</title>
<updated>2014-10-25T09:38:18Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2014-10-25T09:38:18Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=ce44657c9e4919b1e4bbbbbe37dbd72257d40736'/>
<id>urn:sha1:ce44657c9e4919b1e4bbbbbe37dbd72257d40736</id>
<content type='text'>
notmuch 0.18.2~rc1 release

Conflicts:
	NEWS
	debian/changelog
</content>
</entry>
<entry>
<title>test: kill '"filename": "signature.asc"' from json output</title>
<updated>2014-10-25T08:39:07Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2014-10-25T07:57:12Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=e32bb2009930e9daf0d8addfc584289abdd3332a'/>
<id>urn:sha1:e32bb2009930e9daf0d8addfc584289abdd3332a</id>
<content type='text'>
This starts to appear with emacs24.4, so we can't easily have it in
our expected output.
</content>
</entry>
<entry>
<title>test: make test_emacs call post-command-hook</title>
<updated>2014-07-13T15:33:53Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2014-05-09T00:20:07Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=eed6c75556e18d943ac690598edceef0c4ee59d5'/>
<id>urn:sha1:eed6c75556e18d943ac690598edceef0c4ee59d5</id>
<content type='text'>
The unread/read changes will use the post-command-hook. test_emacs
does not call the post-command-hook. This adds a notmuch-test-progn
which takes a list of commands as argument and executes them in turn
but runs the post-command-hook after each one.

The caller can batch operations (ie to stop post-command-hook from
being interleaved) by wrapping the batch of operations inside a progn.

We also explicitly run the post-command-hook before getting the output
from a test; this makes sense as this will be a place the user would
be seeing the information.
</content>
</entry>
<entry>
<title>test: use --quick when starting emacs.</title>
<updated>2014-06-14T01:55:14Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2014-05-29T00:26:27Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=2d722bf032bbd4b08b415369e07a3c9e26f2472a'/>
<id>urn:sha1:2d722bf032bbd4b08b415369e07a3c9e26f2472a</id>
<content type='text'>
At least in emacs24, this removes the "site-lisp" directories from the
load path in addition to enforcing --no-site-lisp --no-init-file.

This works around a slightly mysterious bug on Debian that causes
test-lib.el not to load when there is cl-lib.el(c) in some site-lisp
directory.  It should be harmless in general since we really don't
want to load any files from addon packages to emacs.
</content>
</entry>
<entry>
<title>test: add notmuch_search_files_sanitize and use it</title>
<updated>2014-03-11T22:22:52Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani@nikula.org</email>
</author>
<published>2014-03-09T13:19:09Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=7630f300ba52f4aab22ee696fe1507d0ef9790bc'/>
<id>urn:sha1:7630f300ba52f4aab22ee696fe1507d0ef9790bc</id>
<content type='text'>
We do this in a lot of places, so make it a helper in the test-lib.
</content>
</entry>
<entry>
<title>test: add utility function to sort a json list</title>
<updated>2014-03-11T22:22:52Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2014-03-11T16:52:19Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=8c37821a0d09db8a231e0ef31d5862cbf902f77b'/>
<id>urn:sha1:8c37821a0d09db8a231e0ef31d5862cbf902f77b</id>
<content type='text'>
So far we only need this one place, but it's a bit messy to inline
</content>
</entry>
<entry>
<title>support for generating decreasing dates in bash 4.0 and 4.1</title>
<updated>2014-03-09T13:09:51Z</updated>
<author>
<name>Tomi Ollila</name>
<email>tomi.ollila@iki.fi</email>
</author>
<published>2014-02-10T21:15:00Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=e79d2fc993dcd6fb328c31b2a0466cf7413a8276'/>
<id>urn:sha1:e79d2fc993dcd6fb328c31b2a0466cf7413a8276</id>
<content type='text'>
The printf builtin "%(fmt)T" specifier (which allows time values
to use strftime-like formatting) is introduced in bash 4.2.

Trying to execute this in pre-4.2 bash will fail -- and if this
happens execute the fallback piece of perl code to do the same thing.
</content>
</entry>
</feed>
