<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/test/notmuch-test, branch 0.4</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=0.4</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=0.4'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2010-10-28T19:07:42Z</updated>
<entry>
<title>test: Emit a friendly error message if run with bash &lt; 4.0.</title>
<updated>2010-10-28T19:07:42Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2010-10-28T19:07:42Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=20018a0c094f576589ea82d5ca5116dfd3c0ea55'/>
<id>urn:sha1:20018a0c094f576589ea82d5ca5116dfd3c0ea55</id>
<content type='text'>
The bash code in the test suite is using associative arrays which were
only added to bash as of release 4.0.

If the test suite is run with an older bash, we now immediately error
out and explain the situation, (instead of emitting confusing error
messages and failing dozens of tests, which is what happened before
this change).
</content>
</entry>
<entry>
<title>test: Add the most rudimentary testing of the emacs interface.</title>
<updated>2010-10-22T19:10:15Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2010-10-22T19:10:15Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=1375d71ff41de7c189f9c3ac4f72a8a617d4a5a7'/>
<id>urn:sha1:1375d71ff41de7c189f9c3ac4f72a8a617d4a5a7</id>
<content type='text'>
So far, this is doing nothing more than adding a corpus of email and
ensuring that the `notmuch-hello' function produces the desired
output.
</content>
</entry>
<entry>
<title>test: Fix the search and dump-restore tests to operator on non-empty mail store.</title>
<updated>2010-09-20T23:40:35Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2010-09-20T23:40:35Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=5497b01c27ed217bc351d9995e0f46c3d6ff2442'/>
<id>urn:sha1:5497b01c27ed217bc351d9995e0f46c3d6ff2442</id>
<content type='text'>
We do this with a new add_email_corpus function that establishes a
mail store with 50 messages from the notmuch mailing list.
</content>
</entry>
<entry>
<title>test: Print section names, and rename all test sections</title>
<updated>2010-09-20T21:38:56Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2010-09-20T21:36:31Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=4813ee41d63e8bb6f699303be3123be12dfde3f5'/>
<id>urn:sha1:4813ee41d63e8bb6f699303be3123be12dfde3f5</id>
<content type='text'>
Now that we can usefully pass section names via the NOTMUCH_SKIP_TESTS
environment variable, it's useful to actually print those names out
for the user. Then, since we're now printing these names, let's use
nicer names, (not excessively long but also not using abbreviations
like "msg").
</content>
</entry>
<entry>
<title>test: Fix notmuch-test to pass command-line arguments to sub-scripts.</title>
<updated>2010-09-20T20:45:29Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2010-09-20T20:45:29Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=8369ed31d0d687c35dc2464b347dadf16962cd27'/>
<id>urn:sha1:8369ed31d0d687c35dc2464b347dadf16962cd27</id>
<content type='text'>
The is useful for things like "notmuch-test --valgrind", etc.
</content>
</entry>
<entry>
<title>test: Rename all tests to get rid of the ugly numbers in file names.</title>
<updated>2010-09-17T23:01:42Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2010-09-17T22:58:39Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=7263aa9ec3f72bb65a491b2c64345ab5258b24ee'/>
<id>urn:sha1:7263aa9ec3f72bb65a491b2c64345ab5258b24ee</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>test: Cleanup the test output</title>
<updated>2010-09-17T21:08:36Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2010-09-17T20:53:47Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=222926abe1e221a6239ccb9436968af43e1b6fb2'/>
<id>urn:sha1:222926abe1e221a6239ccb9436968af43e1b6fb2</id>
<content type='text'>
This makes the new, git-derived test suite report results in a manner
similar to the original notmuch test suite.

Notable changes include:

  * No more initial '*' on every line
  * Only colorize a single word
  * Don't print useless test numbers
  * Use "PASS" in place of "ok"
  * Begin sentences with a capital letter
  * Print test descriptions for each block
  * Separate each block of tests with a blank line
  * Don't summarize counts between each block
</content>
</entry>
<entry>
<title>test: Fix test suite to integrate with our non-recursive Makefile system.</title>
<updated>2010-09-17T19:16:10Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2010-09-17T19:10:54Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=e6ba2c63c9ba3d8999bd2f1c5eac3c5bf7c14167'/>
<id>urn:sha1:e6ba2c63c9ba3d8999bd2f1c5eac3c5bf7c14167</id>
<content type='text'>
This avoids "make test" emitting messages from three (3!) recursive
invocations of make. We change the invocations of the tests themselves
to occur directly from the shell script rather than having the shell
script invoke make again and using wildcards in the Makefile.
</content>
</entry>
<entry>
<title>Convert the actual tests to the new framework</title>
<updated>2010-09-16T22:56:44Z</updated>
<author>
<name>Michal Sojka</name>
<email>sojkam1@fel.cvut.cz</email>
</author>
<published>2010-06-10T06:48:03Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=5398e6966a80e1aaad111e1fc0c61d0aa199a229'/>
<id>urn:sha1:5398e6966a80e1aaad111e1fc0c61d0aa199a229</id>
<content type='text'>
The changes are:
- The notmuch-test was split into several files (t000?-*.sh).
- Removed helper functions which were moved to test-lib.sh
- Replaced every printf with test_expect_success.
- Test commands chained with &amp;&amp; (test-lib.sh doesn't use "set -e" in
  order to complete the test suite even if something fails)
- Many variables such as ${MAIL_DIR} were properly quoted as they
  contain spaces.
- Changed quoting patterns in add_message and generate_message (single
  quotes are already used by the test framework).
- ${TEST_DIR} replaced by ${PWD}

QUICK HOWTO:

To run the whole test suite
    make

To run only a single test
   ./t0001-new.sh

To stop on the first error
   ./t0001-new.sh -i
then mail store and database can be inspected in
"trash directory.t0001-new"

To see the output of tests
   ./t0001-new.sh -v

To not remove trash directory at the end:
   ./t0001-new.sh -d

To run all tests verbosely:
   make GIT_TEST_OPTS="-v"

Signed-off-by: Michal Sojka &lt;sojkam1@fel.cvut.cz&gt;
</content>
</entry>
<entry>
<title>Avoid giving GMime a NULL MIME-stream filter.</title>
<updated>2010-06-05T15:40:26Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2010-06-05T15:40:26Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=9c7668bdb51e4739eecda83b6452ef668ed0efa3'/>
<id>urn:sha1:9c7668bdb51e4739eecda83b6452ef668ed0efa3</id>
<content type='text'>
Micah Anderson reported an issue where a message failed to display in
the emacs interface, (it instead gave an error, "json-read-string: Bad
string format").

Micah tracked this down to the json output from "notmuch show" being
interrupted by a GMime error message:

	gmime-CRITICAL **: g_mime_stream_filter_add: assertion
	`GMIME_IS_FILTER (filter)

I tracked this down further to notmuch passing a NULL value to
g_mime_stream_filter_add. And this was due to calling
g_mime_filter_charset_new with a value of "unknown-8bit".

So we add a test message withe a Conten-Type of "text/plain;
charset=unknown-8bit" from Micah's message. Then we fix "notmuch show"
to test for NULL before calling g_mime_stream_filter_add. Bug fixed.
</content>
</entry>
</feed>
