<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/test/search-output, branch 0.15.2</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=0.15.2</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=0.15.2'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2012-08-03T23:14:47Z</updated>
<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>test: add two new messages to corpus with iso-8859-1 encoding</title>
<updated>2012-01-01T03:04:01Z</updated>
<author>
<name>David Bremner</name>
<email>bremner@debian.org</email>
</author>
<published>2012-01-01T02:15:02Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=7da6733e890b913281afd5061cf5a648094a1eb4'/>
<id>urn:sha1:7da6733e890b913281afd5061cf5a648094a1eb4</id>
<content type='text'>
One is quoted printable, the other users 8 bit encoding. The latter
triggers a bug in the python bindings due to missing call to
g_mime_init. The corresponding test is marked broken in this commit.
</content>
</entry>
<entry>
<title>test:Expect multiple filenames for message with multiple files</title>
<updated>2011-06-28T19:05:50Z</updated>
<author>
<name>Mark Anderson</name>
<email>ma.skies@gmail.com</email>
</author>
<published>2011-06-24T22:36:40Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=c87da6961d218db1d80cc9a164910a02401a96e5'/>
<id>urn:sha1:c87da6961d218db1d80cc9a164910a02401a96e5</id>
<content type='text'>
Update the test mail corpus to have two files with the same content to
expose the bug where a single message with multiple filenames only
reports a single filename.

Update expected results for search --output=files to match new
behavior for multiple files corresponding to a single message

Signed-off-by: Mark Anderson &lt;ma.skies@gmail.com&gt;
</content>
</entry>
<entry>
<title>Fix misspelling in search output sanitization test.</title>
<updated>2011-06-03T19:30:55Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2011-05-28T21:51:53Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=c62a0d016f79d6a55d62352029e74d09d4a2f438'/>
<id>urn:sha1:c62a0d016f79d6a55d62352029e74d09d4a2f438</id>
<content type='text'>
A simple spelling fix in the text description.

Signed-off-by: Jameson Graef Rollins &lt;jrollins@finestructure.net&gt;
</content>
</entry>
<entry>
<title>test: cleanup search-output test names (no functional change)</title>
<updated>2011-06-02T04:59:42Z</updated>
<author>
<name>Jameson Graef Rollins</name>
<email>jrollins@finestructure.net</email>
</author>
<published>2011-05-08T23:55:07Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=c4e6d3291cb12fdf3f12a6edf51ab7f1e941e579'/>
<id>urn:sha1:c4e6d3291cb12fdf3f12a6edf51ab7f1e941e579</id>
<content type='text'>
Signed-off-by: Jameson Graef Rollins &lt;jrollins@finestructure.net&gt;
</content>
</entry>
<entry>
<title>test: add test for sanitized notmuch-search output</title>
<updated>2011-06-02T04:58:16Z</updated>
<author>
<name>Florian Friesdorf</name>
<email>flo@chaoflow.net</email>
</author>
<published>2011-05-08T23:13:15Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=8dcd8b69874c0dcb09a5831e6082cb9098edc959'/>
<id>urn:sha1:8dcd8b69874c0dcb09a5831e6082cb9098edc959</id>
<content type='text'>
This feature was recently added, so it of course needs a test now.

Signed-off-by: Jameson Graef Rollins &lt;jrollins@finestructure.net&gt;

Edited-by: Carl Worth &lt;cworth@cworth.org&gt; Fixed test to use
notmuch_search_sanitize in order to be robust against unpredictable
thread ID numbers, (due to unpredictable order in which the filesystem
presents files).
</content>
</entry>
<entry>
<title>test: remove json test for search null result, since it's being more properly tested in search-output</title>
<updated>2011-06-01T23:35:11Z</updated>
<author>
<name>Jameson Graef Rollins</name>
<email>jrollins@finestructure.net</email>
</author>
<published>2011-05-08T21:13:05Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=afdfa5674c84bbb8c0e546384e03a058d317b7a0'/>
<id>urn:sha1:afdfa5674c84bbb8c0e546384e03a058d317b7a0</id>
<content type='text'>
The test in json was inferior to the one in search-output, since it
wasn't properly testing for the presence of a trailing newline.
</content>
</entry>
<entry>
<title>test: Move a test from search to search-output, and add a similar json test</title>
<updated>2011-06-01T23:31:52Z</updated>
<author>
<name>Jameson Graef Rollins</name>
<email>jrollins@finestructure.net</email>
</author>
<published>2011-05-06T18:57:16Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=7a453716c27f09063e0bda56b9ba1d6b2cdd17b5'/>
<id>urn:sha1:7a453716c27f09063e0bda56b9ba1d6b2cdd17b5</id>
<content type='text'>
The "Search for non-existent message prints nothing" test fits better
with the existing tests in search-output, so move it there. Also add a
similar test for the --format=json case.

These tests also use the new test_expect_equal_file function, (to ensure
that the presence of a trailing newline is correctly tested).
</content>
</entry>
<entry>
<title>test: modify search-output test to use the new test_expect_equal_file function</title>
<updated>2011-06-01T20:08:26Z</updated>
<author>
<name>Jameson Graef Rollins</name>
<email>jrollins@finestructure.net</email>
</author>
<published>2011-05-06T18:52:10Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=593d96ff1d2c7f3f175cd6b258e02e9f4ce2392d'/>
<id>urn:sha1:593d96ff1d2c7f3f175cd6b258e02e9f4ce2392d</id>
<content type='text'>
These test now properly test for the presence of a newline at the end
of all output.  Right now some of these test will fail because the
search output is currently broken to *not* produce proper newlines in
some cases.
</content>
</entry>
<entry>
<title>tag signed/encrypted during notmuch new</title>
<updated>2011-05-27T23:22:00Z</updated>
<author>
<name>Jameson Graef Rollins</name>
<email>jrollins@finestructure.net</email>
</author>
<published>2011-05-26T01:01:20Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=1d6b49561f50d6cde1b473f9887e37748e49c02c'/>
<id>urn:sha1:1d6b49561f50d6cde1b473f9887e37748e49c02c</id>
<content type='text'>
This patch adds the tag "signed" to messages with any multipart/signed
parts, and the tag "encrypted" to messages with any
multipart/encrypted parts.  This only occurs when messages are indexed
during notmuch new, so a database rebuild is required to have old
messages tagged.
</content>
</entry>
</feed>
