summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2010-04-22 17:17:11 -0700
committerCarl Worth <cworth@cworth.org>2010-04-22 17:17:11 -0700
commitec6d78acf12d5c8fe6d10d091adee6516bf48d8a (patch)
tree8a664ac2d68f3eff35339220d9b5185969c5fef8 /test
parente6e0cb942c24cff55778731ac53e1b737044f84a (diff)
test: Put the json tests into their own section.
Not that the sections actually mean anything yet, but it makes for clean output.
Diffstat (limited to 'test')
-rwxr-xr-xtest/notmuch-test12
1 files changed, 7 insertions, 5 deletions
diff --git a/test/notmuch-test b/test/notmuch-test
index f7dd850..3c1cd9f 100755
--- a/test/notmuch-test
+++ b/test/notmuch-test
@@ -449,6 +449,13 @@ thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; search by to (name) (inbox unr
thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; subject search test (phrase) (inbox unread)
thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; this phrase should not match the subject search test (inbox unread)"
+printf " Search body (utf-8):...\t\t\t"
+add_message '[subject]="utf8-message-body-subject"' '[date]="Sat, 01 Jan 2000 12:00:00 -0000"' '[body]="message body utf8: bödý"'
+output=$($NOTMUCH search 'bödý' | notmuch_search_sanitize)
+pass_if_equal "$output" "thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; utf8-message-body-subject (inbox unread)"
+
+printf "\nTesting --format=json output:\n"
+
printf " Show message: json...\t\t\t\t"
add_message '[subject]="json-show-subject"' '[date]="Sat, 01 Jan 2000 12:00:00 -0000"' '[body]="json-show-message"'
output=$($NOTMUCH show --format=json 'json-show-message')
@@ -470,11 +477,6 @@ add_message [subject]=utf8-sübjéct '[date]="Sat, 01 Jan 2000 12:00:00 -0000"'
output=$($NOTMUCH search subject:utf8-sübjéct | notmuch_search_sanitize)
pass_if_equal "$output" "thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; utf8-sübjéct (inbox unread)"
-printf " Search body (utf-8):...\t\t\t"
-add_message '[subject]="utf8-message-body-subject"' '[date]="Sat, 01 Jan 2000 12:00:00 -0000"' '[body]="message body utf8: bödý"'
-output=$($NOTMUCH search 'bödý' | notmuch_search_sanitize)
-pass_if_equal "$output" "thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; utf8-message-body-subject (inbox unread)"
-
printf " Show message: json, utf-8...\t\t\t"
add_message '[subject]="json-show-utf8-body-sübjéct"' '[date]="Sat, 01 Jan 2000 12:00:00 -0000"' '[body]="jsön-show-méssage"'
output=$($NOTMUCH show --format=json 'jsön-show-méssage')