aboutsummaryrefslogtreecommitdiff
path: root/test/json
AgeCommit message (Collapse)Author
2014-01-13test: renamed test scripts to format T\d\d\d-name.shTomi Ollila
All test scripts to be executed are now named as T\d\d\d-name.sh, numers in increments of 10. This eases adding new tests and developers to see which are test scripts that are executed by test suite and in which order.
2013-12-22test: add emacs_fcc_message that does not use smtp-dummyDavid Bremner
Most of the tests previously using emacs_deliver_message do not use the actual transmitted message, so we replace it with a simpler (and presumably more reliable function) that only saves (and indexes) an fcc copy of the message.
2013-11-08search: Add stable queries to thread search resultsAustin Clements
These queries will match exactly the set of messages currently in the thread, even if more messages later arrive. Two queries are provided: one for matched messages and one for unmatched messages. This can be used to fix race conditions with tagging threads from search results. While tagging based on a thread: query can affect messages that arrived after the search, tagging based on stable queries affects only the messages the user was shown in the search UI. Since we want clients to be able to depend on the presence of these queries, this ushers in schema version 2.
2012-12-17test: conform to content length, encoding fieldsPeter Wang
Update tests to expect content-length and content-transfer-encoding fields in show --format=json output, for leaf parts with omitted body content.
2012-12-16test: Sanity tests for the --format-version argumentAustin Clements
2012-11-07test: add test for showing Reply-To headersPeter Wang
Test that show --format=json now outputs Reply-To header fields when present.
2012-10-22notmuch-show: include Bcc header in json outputMichal Nazarewicz
With this change, emacs users can use notmuch-message-headers variable to configure notmuch-show display Bcc header.
2012-08-03test: Remove unnecessary JSON canonicalizationAustin Clements
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.
2012-08-03test: Uniformly canonicalize actual and expected JSONAustin Clements
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.
2012-07-24test: add tests for the new --body=true|false optionMark Walters
2012-07-24Use the structured formatters in notmuch-search.c.craven@gmx.net
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.
2012-03-02test: update tests to reflect the exclude flagMark Walters
notmuch show outputs the exclude flag so many tests using notmuch show failed. This commit adds "excluded:0" or "excluded: false" to the expected outputs. After this commit there should be no failing tests.
2012-03-01show: Unify JSON header output for messages and message partsAustin Clements
This has three ramifications: - Blank To and Cc headers are no longer output for messages. - Dates are now canonicalized for messages, which means they always have a day of the week and GMT is printed +0000 (never -0000) - Invalid From message headers are handled slightly differently, since they get parsed by GMime now instead of notmuch.
2011-12-07test: date_relative in notmuch search json outputpazz
expect the date_relative field for thread entries in notmuch search's json output note from Commiter: we don't have to worry about the date changing because the date in question is more than 180 days old.
2011-11-05test: json show format of message with inline attachment with filenameDmitry Kurochkin
The patch adds a test to check that json show format includes filenames for attachments with inline disposition.
2011-06-01test: remove json test for search null result, since it's being more properly tested in search-outputJameson Graef Rollins
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.
2011-06-01test: move utf-8 subject search test from json to search test scriptJameson Graef Rollins
This test doesn't have anything to do with json, and has everything to do with testing search capability, so I'm not sure why it was in the wrong place.
2011-05-27test: change "#!/bin/bash" to "#!/usr/bin/env bash" enhances portabilityJoel Borggrén-Franck
Change #!/bin/bash at start of tests to "#!/usr/bin/env bash". That way systems running on bash < 4 can prepend bash >= 4 to path before running the tests.
2011-03-09json: Fix search result with no matches to be a valid json object.Carl Worth
In the original json code, search matching nothing would return a valid, empty json array (that is, "[]"). I broke this in commit 6dcb7592e32ed5140ea0c0357ce78d6a37af6066 when adding support for --output=threads|messages|tags. This time, while fixing the bug also add a test to the test suite to help avoid future regressions.
2010-09-20test: Remove useless NOTMUCH variable (in favor of simply "notmuch")Carl Worth
When the NOTMUCH variable was originally invented it was used as an explicit path to the notmuch binary being tested. Today, the test suite sets the PATH variable instead, so the NOTMUCH variable always has a value of simply "notmuch". We simplifying that by using the constant value rather than the continual variable reference.
2010-09-17test: Rename all tests to get rid of the ugly numbers in file names.Carl Worth
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.