<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/test, branch 0.14</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=0.14</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=0.14'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2012-08-12T19:25:01Z</updated>
<entry>
<title>sprinters: bugfix when NULL passed for a string.</title>
<updated>2012-08-12T19:25:01Z</updated>
<author>
<name>Mark Walters</name>
<email>markwalters1009@gmail.com</email>
</author>
<published>2012-08-08T21:23:33Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=94c3b40d41f1ad98719d411ef28b69075fda0579'/>
<id>urn:sha1:94c3b40d41f1ad98719d411ef28b69075fda0579</id>
<content type='text'>
The string function in a sprinter may be called with a NULL string
pointer (eg if a header is absent). This causes a segfault. We fix
this by checking for a null pointer in the string functions and update
the sprinter documentation.

At the moment some output when format=text is done directly rather than
via an sprinter: in that case a null pointer is passed to printf or
similar and a "(null)" appears in the output. That behaviour is not
changed in this patch.
</content>
</entry>
<entry>
<title>test: Add test for messages with missing headers</title>
<updated>2012-08-12T19:06:50Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2012-08-08T01:28:33Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=36e640852b240ad10daed626391e1b812df89200'/>
<id>urn:sha1:36e640852b240ad10daed626391e1b812df89200</id>
<content type='text'>
Currently the JSON tests for search and show are broken because
notmuch attempts to dereference a NULL pointer.
</content>
</entry>
<entry>
<title>notmuch-restore: replace positional argument for input with option</title>
<updated>2012-08-06T11:52:45Z</updated>
<author>
<name>David Bremner</name>
<email>bremner@debian.org</email>
</author>
<published>2012-08-04T12:55:45Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=19c824c3fd7be29a2257cdd530ee23074c978d63'/>
<id>urn:sha1:19c824c3fd7be29a2257cdd530ee23074c978d63</id>
<content type='text'>
Since notmuch dump doesn't use positional arguments anymore, it seems
better to be consistent.
</content>
</entry>
<entry>
<title>notmuch-dump: remove deprecated positional argument for output file</title>
<updated>2012-08-06T11:52:33Z</updated>
<author>
<name>David Bremner</name>
<email>bremner@debian.org</email>
</author>
<published>2012-08-04T02:23:11Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=760e17488e6b11299f2971cf879b109b84816d14'/>
<id>urn:sha1:760e17488e6b11299f2971cf879b109b84816d14</id>
<content type='text'>
The syntax --output=filename is a smaller change than deleting the
output argument completely, and conceivably useful e.g. when running
notmuch under a debugger.
</content>
</entry>
<entry>
<title>test: Remove unnecessary JSON canonicalization</title>
<updated>2012-08-03T23:16:45Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2012-08-03T01:14:48Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=624d1897ce70fde8a41f2ea245db2a5e27f16ce1'/>
<id>urn:sha1:624d1897ce70fde8a41f2ea245db2a5e27f16ce1</id>
<content type='text'>
Format canonicalization of JSON output is no longer necessary, so
remove it.  Value canonicalization (e.g., normalizing thread IDs) is
still necessary, so all of the sanitization functions remain.
</content>
</entry>
<entry>
<title>test: Uniformly canonicalize actual and expected JSON</title>
<updated>2012-08-03T23:14:47Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2012-08-03T01:14:47Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=a34bb1f9fad7c547eec5c254ce8274f190491186'/>
<id>urn:sha1:a34bb1f9fad7c547eec5c254ce8274f190491186</id>
<content type='text'>
Previously, we used a variety of ad-hoc canonicalizations for JSON
output in the test suite, but were ultimately very sensitive to JSON
irrelevancies such as whitespace.  This introduces a new test
comparison function, test_expect_equal_json, that first pretty-prints
*both* the actual and expected JSON and the compares the result.

The current implementation of this simply uses Python's json.tool to
perform pretty-printing (with a fallback to the identity function if
parsing fails).  However, since the interface it introduces is
semantically high-level, we could swap in other mechanisms in the
future, such as another pretty-printer or something that does not
re-order object keys (if we decide that we care about that).

In general, this patch does not remove the existing ad-hoc
canonicalization because it does no harm.  We do have to remove the
newline-after-comma rule from notmuch_json_show_sanitize and
filter_show_json because it results in invalid JSON that cannot be
pretty-printed.

Most of this patch simply replaces test_expect_equal and
test_expect_equal_file with test_expect_equal_json.  It changes the
expected JSON in a few places where sanitizers had placed newlines
after commas inside strings.
</content>
</entry>
<entry>
<title>build system: remove directories created by tests in "make clean"</title>
<updated>2012-08-03T00:09:45Z</updated>
<author>
<name>David Bremner</name>
<email>bremner@debian.org</email>
</author>
<published>2012-08-02T12:27:26Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=8a745d310f966194e82f12f6453f05cc877379d6'/>
<id>urn:sha1:8a745d310f966194e82f12f6453f05cc877379d6</id>
<content type='text'>
These extra directories cause problems for building on Debian
twice in a row.

In order to remove directories, we need to us "rm -rf" instead of
"rm -f". So now we should be extra careful what we add to the
variable CLEAN.
</content>
</entry>
<entry>
<title>test: add tests for the new --body=true|false option</title>
<updated>2012-07-24T18:29:38Z</updated>
<author>
<name>Mark Walters</name>
<email>markwalters1009@gmail.com</email>
</author>
<published>2012-07-24T18:23:28Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=3ea77f9f1fbc4781da29d9eee2e92e6c143e7a4a'/>
<id>urn:sha1:3ea77f9f1fbc4781da29d9eee2e92e6c143e7a4a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Use the structured formatters in notmuch-search.c.</title>
<updated>2012-07-24T12:27:09Z</updated>
<author>
<name>craven@gmx.net</name>
<email>craven@gmx.net</email>
</author>
<published>2012-07-23T10:39:46Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=10ab2b57039d7ef06c82749530ff48675e81d16d'/>
<id>urn:sha1:10ab2b57039d7ef06c82749530ff48675e81d16d</id>
<content type='text'>
This patch switches from the current ad-hoc printer to the structured
formatters in sprinter.h, sprinter-text.c and sprinter-json.c.

The JSON tests are changed slightly in order to make them PASS for the
new structured output formatter.

The text tests pass without adaptation.
</content>
</entry>
<entry>
<title>emacs: Switch from text to JSON format for search results</title>
<updated>2012-07-12T23:39:36Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2012-07-09T21:42:41Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=9c5ea07cc66a00132d20db0c8b2094d25ce564ba'/>
<id>urn:sha1:9c5ea07cc66a00132d20db0c8b2094d25ce564ba</id>
<content type='text'>
The JSON format eliminates the complex escaping issues that have
plagued the text search format.  This uses the incremental JSON parser
so that, like the text parser, it can output search results
incrementally.

This slows down the parser by about ~4X, but puts us in a good
position to optimize either by improving the JSON parser (evidence
suggests this can reduce the overhead to ~40% over the text format) or
by switching to S-expressions (evidence suggests this will more than
double performance over the text parser).  [1]

This also fixes the incremental search parsing test.

This has one minor side-effect on search result formatting.
Previously, the date field was always padded to a fixed width of 12
characters because of how the text parser's regexp was written.  The
JSON format doesn't do this.  We could pad it out in Emacs before
formatting it, but, since all of the other fields are variable width,
we instead fix notmuch-search-result-format to take the variable-width
field and pad it out.  For users who have customized this variable,
we'll mention in the NEWS how to fix this slight format change.

[1] id:"20110720205007.GB21316@mit.edu"
</content>
</entry>
</feed>
