test: standardize argument order to test_expect_equal_file

It is annoying to debug failing tests when the interpretation of the
diffs is reversed for some tests.
This commit is contained in:
David Bremner 2017-04-04 21:36:29 -03:00
parent 33e5802195
commit ec3937b5cd
18 changed files with 142 additions and 142 deletions

View file

@ -144,7 +144,7 @@ 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)
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "Search body (utf-8):"
add_message '[subject]="utf8-message-body-subject"' '[date]="Sat, 01 Jan 2000 12:00:00 -0000"' '[body]="message body utf8: bödý"'

View file

@ -32,7 +32,7 @@ thread:THREADID
thread:THREADID
thread:THREADID
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "--output=threads --format=json"
notmuch search --format=json --output=threads '*' | sed -e s/\".*\"/\"THREADID\"/ >OUTPUT
@ -120,25 +120,25 @@ id:87lji5cbwo.fsf@yoom.home.cworth.org
id:1258471718-6781-2-git-send-email-dottedmag@dottedmag.net
id:1258471718-6781-1-git-send-email-dottedmag@dottedmag.net
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "--output=messages --duplicate=1"
notmuch search --output=messages --duplicate=1 '*' >OUTPUT
# reuse same EXPECTED as above
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "--output=messages --duplicate=2"
notmuch search --output=messages --duplicate=2 '*' >OUTPUT
cat <<EOF >EXPECTED
id:20091117232137.GA7669@griffis1.net
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "--output=messages --duplicate=3"
notmuch search --output=messages --duplicate=3 '*' >OUTPUT
cat <<EOF >EXPECTED
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "--output=messages --format=json"
notmuch search --format=json --output=messages '*' >OUTPUT
@ -196,26 +196,26 @@ cat <<EOF >EXPECTED
"1258471718-6781-2-git-send-email-dottedmag@dottedmag.net",
"1258471718-6781-1-git-send-email-dottedmag@dottedmag.net"]
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "--output=messages --format=json --duplicate=1"
notmuch search --output=messages --format=json --duplicate=1 '*' >OUTPUT
# reuse same EXPECTED as above
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "--output=messages --format=json --duplicate=2"
notmuch search --output=messages --format=json --duplicate=2 '*' >OUTPUT
cat <<EOF >EXPECTED
["20091117232137.GA7669@griffis1.net"]
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "--output=messages --format=json --duplicate=3"
notmuch search --output=messages --format=json --duplicate=3 '*' >OUTPUT
cat <<EOF >EXPECTED
[]
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "--output=files"
notmuch search --output=files '*' | notmuch_search_files_sanitize | sort >OUTPUT
@ -274,7 +274,7 @@ MAIL_DIR/foo/new/09:2,
MAIL_DIR/foo/new/10:2,
MAIL_DIR/new/04:2,
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
dup1=$(notmuch search --output=files id:20091117232137.GA7669@griffis1.net | head -n 1 | sed -e "s,$MAIL_DIR,MAIL_DIR,")
dup2=$(notmuch search --output=files id:20091117232137.GA7669@griffis1.net | tail -n 1 | sed -e "s,$MAIL_DIR,MAIL_DIR,")
@ -335,7 +335,7 @@ MAIL_DIR/foo/cur/07:2,
MAIL_DIR/02:2,
MAIL_DIR/01:2,
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "--output=files --format=json"
notmuch search --format=json --output=files '*' | notmuch_search_files_sanitize \
@ -395,14 +395,14 @@ cat <<EOF | test_sort_json >EXPECTED
"MAIL_DIR/02:2,",
"MAIL_DIR/01:2,"]
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "--output=files --format=json --duplicate=2"
notmuch search --format=json --output=files --duplicate=2 '*' | notmuch_search_files_sanitize >OUTPUT
cat <<EOF >EXPECTED
["$dup2"]
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "--output=tags"
notmuch search --output=tags '*' >OUTPUT
@ -412,7 +412,7 @@ inbox
signed
unread
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "--output=tags --format=json"
notmuch search --format=json --output=tags '*' >OUTPUT
@ -422,7 +422,7 @@ cat <<EOF >EXPECTED
"signed",
"unread"]
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "sanitize output for quoted-printable line-breaks in author and subject"
add_message "[subject]='two =?ISO-8859-1?Q?line=0A_subject?=
@ -431,16 +431,16 @@ notmuch search id:"$gen_msg_id" | notmuch_search_sanitize >OUTPUT
cat <<EOF >EXPECTED
thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; two line subject headers (inbox unread)
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "search for non-existent message prints nothing"
notmuch search "no-message-matches-this" > OUTPUT
echo -n >EXPECTED
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "search --format=json for non-existent message prints proper empty json"
notmuch search --format=json "no-message-matches-this" > OUTPUT
echo "[]" >EXPECTED
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_done

View file

@ -25,12 +25,12 @@ Adrian Perez de Castro <aperez@igalia.com>
Israel Herraiz <isra@herraiz.org>
Mikhail Gusarov <dottedmag@dottedmag.net>
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "without --output"
notmuch address '*' >OUTPUT
# Use EXPECTED from previous subtest
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "--output=sender --format=json"
notmuch address --output=sender --format=json '*' >OUTPUT
@ -53,7 +53,7 @@ cat <<EOF >EXPECTED
{"name": "Israel Herraiz", "address": "isra@herraiz.org", "name-addr": "Israel Herraiz <isra@herraiz.org>"},
{"name": "Mikhail Gusarov", "address": "dottedmag@dottedmag.net", "name-addr": "Mikhail Gusarov <dottedmag@dottedmag.net>"}]
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "--output=recipients"
notmuch address --output=recipients '*' >OUTPUT
@ -66,7 +66,7 @@ notmuch <notmuch@notmuchmail.org>
Keith Packard <keithp@keithp.com>
Mikhail Gusarov <dottedmag@dottedmag.net>
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "--output=sender --output=recipients"
notmuch address --output=sender --output=recipients '*' >OUTPUT
@ -94,7 +94,7 @@ Adrian Perez de Castro <aperez@igalia.com>
Israel Herraiz <isra@herraiz.org>
Mikhail Gusarov <dottedmag@dottedmag.net>
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "--output=sender --output=count"
notmuch address --output=sender --output=count '*' | sort -n >OUTPUT
@ -117,7 +117,7 @@ cat <<EOF >EXPECTED
7 Keith Packard <keithp@keithp.com>
12 Carl Worth <cworth@cworth.org>
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "--output=count --format=json"
# Since the iteration order of GHashTable is not specified, we
@ -143,7 +143,7 @@ cat <<EOF >EXPECTED
{"name": "Rolland Santimano", "address": "rollandsantimano@yahoo.com", "name-addr": "Rolland Santimano <rollandsantimano@yahoo.com>", "count": 1}
{"name": "Stewart Smith", "address": "stewart@flamingspork.com", "name-addr": "Stewart Smith <stewart@flamingspork.com>", "count": 3}
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "--deduplicate=no --sort=oldest-first --output=sender"
notmuch address --deduplicate=no --sort=oldest-first --output=sender '*' >OUTPUT
@ -201,7 +201,7 @@ Chris Wilson <chris@chris-wilson.co.uk>
Olivier Berger <olivier.berger@it-sudparis.eu>
François Boulogne <boulogne.f@gmail.com>
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "--deduplicate=no --sort=newest-first --output=sender --output=recipients"
notmuch address --deduplicate=no --sort=newest-first --output=sender --output=recipients path:foo/new >OUTPUT
@ -213,7 +213,7 @@ notmuch@notmuchmail.org
Lars Kellogg-Stedman <lars@seas.harvard.edu>
notmuch@notmuchmail.org
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "--deduplicate=address --output=sender --output=recipients"
notmuch address --deduplicate=address --output=sender --output=recipients '*' | sort >OUTPUT
@ -238,7 +238,7 @@ Rolland Santimano <rollandsantimano@yahoo.com>
Stewart Smith <stewart@flamingspork.com>
notmuch@notmuchmail.org
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
generate_message '[from]="Foo Bar <foo.bar@example.com>"'
generate_message '[from]="Foo Bar <Foo.Bar@Example.Com>"'
@ -266,7 +266,7 @@ Foo Bar <foo.bar@example.com>
foo.bar@example.com
foo.bar@example.com
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "--deduplicate=mailbox --output=sender --output=count"
notmuch address --deduplicate=mailbox --output=sender --output=count from:example.com | sort -n >OUTPUT
@ -279,7 +279,7 @@ cat <<EOF >EXPECTED
2 Foo Bar <foo.bar@example.com>
2 foo.bar@example.com
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "--deduplicate=address --output=sender --output=count"
notmuch address --deduplicate=address --output=sender --output=count from:example.com | sort -n >OUTPUT
@ -287,6 +287,6 @@ cat <<EOF >EXPECTED
3 Baz <foo.bar+baz@example.com>
7 Foo Bar <foo.bar@example.com>
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_done

View file

@ -178,7 +178,7 @@ Non-text part: application/pgp-signature
body}
message}
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "--format=text --part=1, message body"
notmuch show --format=text --part=1 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
@ -217,7 +217,7 @@ Non-text part: application/pgp-signature
part}
part}
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "--format=text --part=2, multipart/mixed"
notmuch show --format=text --part=2 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
@ -251,7 +251,7 @@ And this message is signed.
part}
part}
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "--format=text --part=3, rfc822 part"
notmuch show --format=text --part=3 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
@ -275,7 +275,7 @@ This is an embedded message, with a multipart/alternative part.
body}
part}
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "--format=text --part=4, rfc822's multipart"
notmuch show --format=text --part=4 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
@ -289,7 +289,7 @@ This is an embedded message, with a multipart/alternative part.
part}
part}
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "--format=text --part=5, rfc822's html part"
notmuch show --format=text --part=5 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
@ -298,7 +298,7 @@ cat <<EOF >EXPECTED
Non-text part: text/html
part}
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "--format=text --part=6, rfc822's text part"
notmuch show --format=text --part=6 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
@ -307,7 +307,7 @@ cat <<EOF >EXPECTED
This is an embedded message, with a multipart/alternative part.
part}
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "--format=text --part=7, inline attachement"
notmuch show --format=text --part=7 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
@ -316,7 +316,7 @@ cat <<EOF >EXPECTED
This is a text attachment.
attachment}
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "--format=text --part=8, plain text part"
notmuch show --format=text --part=8 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
@ -327,7 +327,7 @@ And this message is signed.
-Carl
part}
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "--format=text --part=9, pgp signature (unverified)"
notmuch show --format=text --part=9 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
@ -336,7 +336,7 @@ cat <<EOF >EXPECTED
Non-text part: application/pgp-signature
part}
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "--format=text --part=8, no part, expect error"
test_expect_success "notmuch show --format=text --part=8 'id:87liy5ap00.fsf@yoom.home.cworth.org'"
@ -448,15 +448,15 @@ test_expect_success "notmuch show --format=json --part=10 'id:87liy5ap00.fsf@yoo
test_begin_subtest "--format=raw"
notmuch show --format=raw 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
test_expect_equal_file OUTPUT "${MAIL_DIR}"/multipart
test_expect_equal_file "${MAIL_DIR}"/multipart OUTPUT
test_begin_subtest "--format=raw --part=0, full message"
notmuch show --format=raw --part=0 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
test_expect_equal_file OUTPUT "${MAIL_DIR}"/multipart
test_expect_equal_file "${MAIL_DIR}"/multipart OUTPUT
test_begin_subtest "--format=raw --part=1, message body"
notmuch show --format=raw --part=1 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
test_expect_equal_file OUTPUT "${MAIL_DIR}"/multipart
test_expect_equal_file "${MAIL_DIR}"/multipart OUTPUT
test_begin_subtest "--format=raw --part=2, multipart/mixed"
notmuch show --format=raw --part=2 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
@ -501,11 +501,11 @@ And this message is signed.
--=-=-=--
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "--format=raw --part=3, rfc822 part"
notmuch show --format=raw --part=3 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
test_expect_equal_file OUTPUT embedded_message
test_expect_equal_file embedded_message OUTPUT
test_begin_subtest "--format=raw --part=4, rfc822's multipart"
notmuch show --format=raw --part=4 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
@ -531,28 +531,28 @@ This is an embedded message, with a multipart/alternative part.
--==-=-==--
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "--format=raw --part=5, rfc822's html part"
notmuch show --format=raw --part=5 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
cat <<EOF >EXPECTED
<p>This is an embedded message, with a multipart/alternative part.</p>
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "--format=raw --part=6, rfc822's text part"
notmuch show --format=raw --part=6 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
cat <<EOF >EXPECTED
This is an embedded message, with a multipart/alternative part.
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "--format=raw --part=7, inline attachment"
notmuch show --format=raw --part=7 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
cat <<EOF >EXPECTED
This is a text attachment.
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "--format=raw --part=8, plain text part"
notmuch show --format=raw --part=8 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
@ -561,7 +561,7 @@ And this message is signed.
-Carl
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "--format=raw --part=9, pgp signature (unverified)"
notmuch show --format=raw --part=9 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
@ -576,7 +576,7 @@ W6cAmQE4dcYrx/LPLtYLZm1jsGauE5hE
=zkga
-----END PGP SIGNATURE-----
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "--format=raw --part=10, no part, expect error"
test_expect_success "notmuch show --format=raw --part=8 'id:87liy5ap00.fsf@yoom.home.cworth.org'"
@ -587,7 +587,7 @@ printf "From cworth@cworth.org Fri Jan 5 15:43:57 2001\n" >EXPECTED
cat "${MAIL_DIR}"/multipart >>EXPECTED
# mbox output is expected to include a blank line
echo >>EXPECTED
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "--format=mbox --part=1, incompatible, expect error"
test_expect_success "! notmuch show --format=mbox --part=1 'id:87liy5ap00.fsf@yoom.home.cworth.org'"
@ -614,7 +614,7 @@ Non-text part: text/html
>
> -Carl
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "'notmuch reply' to a multipart message with json format"
notmuch reply --format=json 'id:87liy5ap00.fsf@yoom.home.cworth.org' | notmuch_json_show_sanitize >OUTPUT

View file

@ -129,7 +129,7 @@ test_begin_subtest "Check for a safe set of message-ids"
notmuch search --output=messages from:cworth | sed s/^id:// > EXPECTED
notmuch search --output=messages from:cworth | sed s/^id:// |\
$TEST_DIRECTORY/hex-xcode --direction=encode > OUTPUT
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "format=batch-tag, dump sanity check."
NOTMUCH_DUMP_TAGS --format=sup from:cworth | cut -f1 -d' ' | \

View file

@ -14,7 +14,7 @@ test_expect_success "${TEST_EMACS} -Q --batch --load $TEST_DIRECTORY/test-lib.el
test_begin_subtest "Basic notmuch-hello view in emacs"
test_emacs '(notmuch-hello)
(test-output)'
test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello
test_expect_equal_file $EXPECTED/notmuch-hello OUTPUT
test_begin_subtest "Saved search with 0 results"
test_emacs '(let ((notmuch-show-empty-saved-searches t)
@ -24,20 +24,20 @@ test_emacs '(let ((notmuch-show-empty-saved-searches t)
("empty" . "tag:doesnotexist"))))
(notmuch-hello)
(test-output))'
test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-with-empty
test_expect_equal_file $EXPECTED/notmuch-hello-with-empty OUTPUT
test_begin_subtest "No saved searches displayed (all with 0 results)"
test_emacs '(let ((notmuch-saved-searches
'\''(("empty" . "tag:doesnotexist"))))
(notmuch-hello)
(test-output))'
test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-no-saved-searches
test_expect_equal_file $EXPECTED/notmuch-hello-no-saved-searches OUTPUT
test_begin_subtest "Basic notmuch-search view in emacs"
test_emacs '(notmuch-search "tag:inbox")
(notmuch-test-wait)
(test-output)'
test_expect_equal_file OUTPUT $EXPECTED/notmuch-search-tag-inbox
test_expect_equal_file $EXPECTED/notmuch-search-tag-inbox OUTPUT
test_begin_subtest "Incremental parsing of search results"
test_emacs "(ad-enable-advice 'notmuch-search-process-filter 'around 'pessimal)
@ -47,7 +47,7 @@ test_emacs "(ad-enable-advice 'notmuch-search-process-filter 'around 'pessimal)
(ad-disable-advice 'notmuch-search-process-filter 'around 'pessimal)
(ad-activate 'notmuch-search-process-filter)
(test-output)"
test_expect_equal_file OUTPUT $EXPECTED/notmuch-search-tag-inbox
test_expect_equal_file $EXPECTED/notmuch-search-tag-inbox OUTPUT
test_begin_subtest "Navigation of notmuch-hello to search results"
test_emacs '(notmuch-hello)
@ -56,34 +56,34 @@ test_emacs '(notmuch-hello)
(widget-button-press (1- (point)))
(notmuch-test-wait)
(test-output)'
test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-view-inbox
test_expect_equal_file $EXPECTED/notmuch-hello-view-inbox OUTPUT
test_begin_subtest "Basic notmuch-show view in emacs"
maildir_storage_thread=$(notmuch search --output=threads id:20091117190054.GU3165@dottiness.seas.harvard.edu)
test_emacs "(notmuch-show \"$maildir_storage_thread\")
(test-output)"
test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-maildir-storage
test_expect_equal_file $EXPECTED/notmuch-show-thread-maildir-storage OUTPUT
test_begin_subtest "Basic notmuch-show view in emacs default indentation"
maildir_storage_thread=$(notmuch search --output=threads id:20091117190054.GU3165@dottiness.seas.harvard.edu)
test_emacs "(let ((notmuch-show-indent-messages-width 1))
(notmuch-show \"$maildir_storage_thread\")
(test-output))"
test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-maildir-storage
test_expect_equal_file $EXPECTED/notmuch-show-thread-maildir-storage OUTPUT
test_begin_subtest "Basic notmuch-show view in emacs without indentation"
maildir_storage_thread=$(notmuch search --output=threads id:20091117190054.GU3165@dottiness.seas.harvard.edu)
test_emacs "(let ((notmuch-show-indent-messages-width 0))
(notmuch-show \"$maildir_storage_thread\")
(test-output))"
test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-maildir-storage-without-indentation
test_expect_equal_file $EXPECTED/notmuch-show-thread-maildir-storage-without-indentation OUTPUT
test_begin_subtest "Basic notmuch-show view in emacs with fourfold indentation"
maildir_storage_thread=$(notmuch search --output=threads id:20091117190054.GU3165@dottiness.seas.harvard.edu)
test_emacs "(let ((notmuch-show-indent-messages-width 4))
(notmuch-show \"$maildir_storage_thread\")
(test-output))"
test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-maildir-storage-with-fourfold-indentation
test_expect_equal_file $EXPECTED/notmuch-show-thread-maildir-storage-with-fourfold-indentation OUTPUT
test_begin_subtest "notmuch-show for message with invalid From"
add_message "[subject]=\"message-with-invalid-from\"" \
@ -100,7 +100,7 @@ Date: GENERATED_DATE
This is just a test message (#1)
EOF
notmuch_date_sanitize < OUTPUT.raw > OUTPUT
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "Navigation of notmuch-search to thread view"
test_emacs '(notmuch-search "tag:inbox")
@ -110,7 +110,7 @@ test_emacs '(notmuch-search "tag:inbox")
(notmuch-search-show-thread)
(notmuch-test-wait)
(test-output)'
test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-maildir-storage
test_expect_equal_file $EXPECTED/notmuch-show-thread-maildir-storage OUTPUT
test_begin_subtest "Add tag from search view"
os_x_darwin_thread=$(notmuch search --output=threads id:ddd65cda0911171950o4eea4389v86de9525e46052d3@mail.gmail.com)
@ -206,7 +206,7 @@ Content-Type: text/plain
This is a test that messages are sent via SMTP
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "Folding a long header when sending via (fake) SMTP"
long_subject="This is a long subject `echo {1..1000}`"
@ -284,7 +284,7 @@ Content-Type: text/plain
This is a test that long headers are folded when messages are sent via SMTP
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "Verify that sent messages are saved/searchable (via FCC)"
notmuch new > /dev/null
@ -301,7 +301,7 @@ To:
Subject:
--text follows this line--
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
# Make another FCC maildir specific for the next test
mkdir -p mail/sent-string/cur
@ -319,7 +319,7 @@ Subject:
Fcc: ${MAIL_DIR}/sent-string
--text follows this line--
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
# Make more FCC maildirs specific for the next test
mkdir -p mail/sent-list-match/cur
@ -342,7 +342,7 @@ Subject:
Fcc: ${MAIL_DIR}/sent-list-match
--text follows this line--
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
# Make another FCC maildir specific for the next test
mkdir -p mail/sent-list-catch-all/cur
@ -362,7 +362,7 @@ Subject:
Fcc: ${MAIL_DIR}/sent-list-catch-all
--text follows this line--
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "notmuch-fcc-dirs set to a list (no match)"
test_emacs "(let ((notmuch-fcc-dirs
@ -376,7 +376,7 @@ To:
Subject:
--text follows this line--
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "Reply within emacs"
test_emacs '(let ((message-hidden-headers ''()))
@ -398,7 +398,7 @@ Notmuch Test Suite <test_suite@notmuchmail.org> writes:
> This is a test that messages are sent via SMTP
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "Reply from alternate address within emacs"
add_message '[from]="Sender <sender@example.com>"' \
@ -421,7 +421,7 @@ Sender <sender@example.com> writes:
> This is just a test message (#${gen_msg_cnt})
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "Reply from address in named group list within emacs"
add_message '[from]="Sender <sender@example.com>"' \
@ -445,7 +445,7 @@ Sender <sender@example.com> writes:
> This is just a test message (#${gen_msg_cnt})
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "Reply within emacs to a multipart/mixed message"
test_emacs '(let ((message-hidden-headers ''()))
@ -506,7 +506,7 @@ Adrian Perez de Castro <aperez@igalia.com> writes:
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "Reply within emacs to a multipart/alternative message"
test_emacs '(let ((message-hidden-headers ''()))
@ -576,7 +576,7 @@ Alex Botero-Lowry <alex.boterolowry@gmail.com> writes:
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "Reply within emacs to an html-only message"
add_message '[content-type]="text/html"' \
@ -597,7 +597,7 @@ Notmuch Test Suite <test_suite@notmuchmail.org> writes:
> Hi,This is an HTML test message.OK?
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "Reply within emacs to message from self"
test_subtest_known_broken
@ -644,7 +644,7 @@ Notmuch Test Suite <test_suite@notmuchmail.org> writes:
> <#!part disposition=inline>
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "Save attachment from within emacs using notmuch-show-save-attachments"
# save as archive to test that Emacs does not re-compress .gz
@ -691,7 +691,7 @@ test_begin_subtest "View raw message within emacs"
test_emacs '(notmuch-show "id:cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com")
(notmuch-show-view-raw-message)
(test-output)'
test_expect_equal_file OUTPUT $EXPECTED/raw-message-cf0c4d-52ad0a
test_expect_equal_file $EXPECTED/raw-message-cf0c4d-52ad0a OUTPUT
test_begin_subtest "Hiding/showing signature in notmuch-show view"
maildir_storage_thread=$(notmuch search --output=threads id:20091117190054.GU3165@dottiness.seas.harvard.edu)
@ -701,7 +701,7 @@ test_emacs "(notmuch-show \"$maildir_storage_thread\")
(search-backward \"Click/Enter to hide.\")
(button-activate (button-at (point)))
(test-output)"
test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-maildir-storage
test_expect_equal_file $EXPECTED/notmuch-show-thread-maildir-storage OUTPUT
test_begin_subtest "Detection and hiding of top-post quoting of message"
add_message '[subject]="The problem with top-posting"' \
@ -749,13 +749,13 @@ Thanks for the advice! I will be sure to put it to good use.
[ 9-line hidden original message. Click/Enter to show. ]" > EXPECTED
notmuch_date_sanitize < OUTPUT.raw > OUTPUT
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "Hiding message in notmuch-show view"
test_emacs '(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.gmail.com")
(notmuch-show-toggle-message)
(test-visible-output)'
test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-with-hidden-messages
test_expect_equal_file $EXPECTED/notmuch-show-thread-with-hidden-messages OUTPUT
test_begin_subtest "Hiding message with visible citation in notmuch-show view"
test_emacs '(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.gmail.com")
@ -763,7 +763,7 @@ test_emacs '(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.
(button-activate (button-at (point)))
(notmuch-show-toggle-message)
(test-visible-output)'
test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-with-hidden-messages
test_expect_equal_file $EXPECTED/notmuch-show-thread-with-hidden-messages OUTPUT
test_begin_subtest "notmuch-show: show message headers"
test_emacs \
@ -771,7 +771,7 @@ test_emacs \
(notmuch-message-headers-visible t))
(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.gmail.com")
(test-visible-output))'
test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-message-with-headers-visible
test_expect_equal_file $EXPECTED/notmuch-show-message-with-headers-visible OUTPUT
test_begin_subtest "notmuch-show: hide message headers"
test_emacs \
@ -779,7 +779,7 @@ test_emacs \
(notmuch-message-headers-visible nil))
(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.gmail.com")
(test-visible-output))'
test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-message-with-headers-hidden
test_expect_equal_file $EXPECTED/notmuch-show-message-with-headers-hidden OUTPUT
test_begin_subtest "notmuch-show: hide message headers (w/ notmuch-show-toggle-visibility-headers)"
test_emacs \
@ -788,20 +788,20 @@ test_emacs \
(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.gmail.com")
(notmuch-show-toggle-visibility-headers)
(test-visible-output))'
test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-message-with-headers-hidden
test_expect_equal_file $EXPECTED/notmuch-show-message-with-headers-hidden OUTPUT
test_begin_subtest "notmuch-show: collapse all messages in thread"
test_emacs '(notmuch-show "id:f35dbb950911171435ieecd458o853c873e35f4be95@mail.gmail.com")
(let ((current-prefix-arg t))
(notmuch-show-open-or-close-all)
(test-visible-output))'
test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-with-all-messages-collapsed
test_expect_equal_file $EXPECTED/notmuch-show-thread-with-all-messages-collapsed OUTPUT
test_begin_subtest "notmuch-show: uncollapse all messages in thread"
test_emacs '(notmuch-show "id:f35dbb950911171435ieecd458o853c873e35f4be95@mail.gmail.com")
(notmuch-show-open-or-close-all)
(test-visible-output)'
test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-with-all-messages-uncollapsed
test_expect_equal_file $EXPECTED/notmuch-show-thread-with-all-messages-uncollapsed OUTPUT
test_begin_subtest "Stashing in notmuch-show"
add_message '[date]="Sat, 01 Jan 2000 12:00:00 -0000"' \
@ -847,7 +847,7 @@ http://mid.gmane.org/bought
https://marc.info/?i=bought
https://mid.mail-archive.com/bought
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "Stashing in notmuch-search"
test_emacs '(notmuch-search "id:\"bought\"")
@ -872,14 +872,14 @@ test_emacs "(notmuch-search \"$message1 or $message2\")
(redisplay)
(notmuch-show-advance-and-archive)
(test-output)"
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "Refresh show buffer"
test_emacs '(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.gmail.com")
(test-visible-output "EXPECTED")
(notmuch-show-refresh-view)
(test-visible-output)'
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "Refresh modified show buffer"
test_emacs '(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.gmail.com")
@ -889,7 +889,7 @@ test_emacs '(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.
(test-visible-output "EXPECTED")
(notmuch-show-refresh-view)
(test-visible-output)'
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "Do not call notmuch for non-inlinable application/mpeg parts"
id='message-with-application/mpeg-attachment@notmuchmail.org'

View file

@ -27,6 +27,6 @@ test_emacs '(notmuch-search "*")
(notmuch-test-wait)
(test-output)'
sed -i -e s', *, ,g' -e 's/xxx*/[BLOB]/g' OUTPUT
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_done

View file

@ -233,7 +233,7 @@ notmuch show \
--part=5 \
--decrypt \
subject:"test encrypted message 001" >OUTPUT
test_expect_equal_file OUTPUT TESTATTACHMENT
test_expect_equal_file TESTATTACHMENT OUTPUT
test_begin_subtest "decryption failure with missing key"
mv "${GNUPGHOME}"{,.bak}

View file

@ -28,7 +28,7 @@ MAIL_DIR/msg-001
MAIL_DIR/spam/msg-001
EOF
notmuch search --output=files id:$id_x | notmuch_search_files_sanitize >OUTPUT
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "Test matches folder:spam"
output=$(notmuch search folder:spam)

View file

@ -16,7 +16,7 @@ for t in q_new.search_threads():
print (t.get_thread_id())
EOF
notmuch search --sort=oldest-first --output=threads tag:inbox | sed s/^thread:// > EXPECTED
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "compare message ids"
test_python <<EOF
@ -28,7 +28,7 @@ for m in q_new.search_messages():
print (m.get_message_id())
EOF
notmuch search --sort=oldest-first --output=messages tag:inbox | sed s/^id:// > EXPECTED
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "get non-existent file"
test_python <<EOF

View file

@ -23,7 +23,7 @@ for t in @q.search_threads do
end
EOF
notmuch search --sort=oldest-first --output=threads tag:inbox | sed s/^thread:// > EXPECTED
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "compare message ids"
test_ruby <<"EOF"
@ -40,7 +40,7 @@ for m in @q.search_messages do
end
EOF
notmuch search --sort=oldest-first --output=messages tag:inbox | sed s/^id:// > EXPECTED
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "get non-existent file"
test_ruby <<"EOF"
@ -67,7 +67,7 @@ end
print @q.count_messages(),"\n"
EOF
notmuch count --output=messages tag:inbox > EXPECTED
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "count threads"
test_ruby <<"EOF"
@ -81,7 +81,7 @@ end
print @q.count_threads(),"\n"
EOF
notmuch count --output=threads tag:inbox > EXPECTED
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "get all tags"
test_ruby <<"EOF"
@ -97,6 +97,6 @@ for tag in @t do
end
EOF
notmuch search --output=tags '*' > EXPECTED
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_done

View file

@ -12,6 +12,6 @@ string foo
positional arg 1 pos1
positional arg 2 pos2
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_done

View file

@ -13,7 +13,7 @@ test_emacs "(let ((notmuch-hello-sections
\"Test\" '((\"inbox\" . \"tag:inbox\")))))))
(notmuch-hello)
(test-output))"
test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-new-section
test_expect_equal_file $EXPECTED/notmuch-hello-new-section OUTPUT
test_begin_subtest "User-defined section with empty, hidden entry"
test_emacs "(let ((notmuch-hello-sections
@ -24,7 +24,7 @@ test_emacs "(let ((notmuch-hello-sections
:hide-empty-searches t)))))
(notmuch-hello)
(test-output))"
test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-section-with-empty
test_expect_equal_file $EXPECTED/notmuch-hello-section-with-empty OUTPUT
test_begin_subtest "User-defined section, unread tag filtered out"
test_emacs "(let ((notmuch-hello-sections
@ -33,7 +33,7 @@ test_emacs "(let ((notmuch-hello-sections
:hide-tags '(\"unread\"))))))
(notmuch-hello)
(test-output))"
test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-section-hidden-tag
test_expect_equal_file $EXPECTED/notmuch-hello-section-hidden-tag OUTPUT
test_begin_subtest "User-defined section, different query for counts"
test_emacs "(let ((notmuch-hello-sections
@ -42,21 +42,21 @@ test_emacs "(let ((notmuch-hello-sections
:filter-count \"tag:signed\")))))
(notmuch-hello)
(test-output))"
test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-section-counts
test_expect_equal_file $EXPECTED/notmuch-hello-section-counts OUTPUT
test_begin_subtest "Empty custom tags section"
test_emacs "(let* ((widget (widget-create 'notmuch-hello-tags-section))
(notmuch-hello-sections (list (widget-value widget))))
(notmuch-hello)
(test-output))"
test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-empty-custom-tags-section
test_expect_equal_file $EXPECTED/notmuch-hello-empty-custom-tags-section OUTPUT
test_begin_subtest "Empty custom queries section"
test_emacs "(let* ((widget (widget-create 'notmuch-hello-query-section))
(notmuch-hello-sections (list (widget-value widget))))
(notmuch-hello)
(test-output))"
test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-empty-custom-queries-section
test_expect_equal_file $EXPECTED/notmuch-hello-empty-custom-queries-section OUTPUT
test_begin_subtest "Column alignment for tag/queries with long names"
tag=a-very-long-tag # length carefully calculated for 80 characters window width
@ -64,6 +64,6 @@ notmuch tag +$tag '*'
test_emacs '(notmuch-hello)
(test-output)'
notmuch tag -$tag '*'
test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-long-names
test_expect_equal_file $EXPECTED/notmuch-hello-long-names OUTPUT
test_done

View file

@ -27,7 +27,7 @@ EOF
test_emacs "(notmuch-show \"id:$message_id\")
(test-visible-output \"OUTPUT.raw\")"
notmuch_date_sanitize < OUTPUT.raw > OUTPUT
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "Bare subject #1"
output=$(test_emacs '(notmuch-show-strip-re "Re: subject")')
@ -45,20 +45,20 @@ test_begin_subtest "don't process cryptographic MIME parts"
test_emacs '(let ((notmuch-crypto-process-mime nil))
(notmuch-show "id:20091117203301.GV3165@dottiness.seas.harvard.edu")
(test-visible-output))'
test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-process-crypto-mime-parts-off
test_expect_equal_file $EXPECTED/notmuch-show-process-crypto-mime-parts-off OUTPUT
test_begin_subtest "process cryptographic MIME parts"
test_emacs '(let ((notmuch-crypto-process-mime t))
(notmuch-show "id:20091117203301.GV3165@dottiness.seas.harvard.edu")
(test-visible-output))'
test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-process-crypto-mime-parts-on
test_expect_equal_file $EXPECTED/notmuch-show-process-crypto-mime-parts-on OUTPUT
test_begin_subtest "process cryptographic MIME parts (w/ notmuch-show-toggle-process-crypto)"
test_emacs '(let ((notmuch-crypto-process-mime nil))
(notmuch-show "id:20091117203301.GV3165@dottiness.seas.harvard.edu")
(notmuch-show-toggle-process-crypto)
(test-visible-output))'
test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-process-crypto-mime-parts-on
test_expect_equal_file $EXPECTED/notmuch-show-process-crypto-mime-parts-on OUTPUT
test_begin_subtest "notmuch-show: don't elide non-matching messages"
test_emacs '(let ((notmuch-show-only-matching-messages nil))
@ -67,7 +67,7 @@ test_emacs '(let ((notmuch-show-only-matching-messages nil))
(notmuch-search-show-thread)
(notmuch-test-wait)
(test-visible-output))'
test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-elide-non-matching-messages-off
test_expect_equal_file $EXPECTED/notmuch-show-elide-non-matching-messages-off OUTPUT
test_begin_subtest "notmuch-show: elide non-matching messages"
test_emacs '(let ((notmuch-show-only-matching-messages t))
@ -76,7 +76,7 @@ test_emacs '(let ((notmuch-show-only-matching-messages t))
(notmuch-search-show-thread)
(notmuch-test-wait)
(test-visible-output))'
test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-elide-non-matching-messages-on
test_expect_equal_file $EXPECTED/notmuch-show-elide-non-matching-messages-on OUTPUT
test_begin_subtest "notmuch-show: elide non-matching messages (w/ notmuch-show-toggle-elide-non-matching)"
test_emacs '(let ((notmuch-show-only-matching-messages nil))
@ -86,7 +86,7 @@ test_emacs '(let ((notmuch-show-only-matching-messages nil))
(notmuch-test-wait)
(notmuch-show-toggle-elide-non-matching)
(test-visible-output))'
test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-elide-non-matching-messages-on
test_expect_equal_file $EXPECTED/notmuch-show-elide-non-matching-messages-on OUTPUT
test_begin_subtest "notmuch-show: elide non-matching messages (w/ prefix arg to notmuch-show)"
test_emacs '(let ((notmuch-show-only-matching-messages nil))
@ -95,7 +95,7 @@ test_emacs '(let ((notmuch-show-only-matching-messages nil))
(notmuch-search-show-thread t)
(notmuch-test-wait)
(test-visible-output))'
test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-elide-non-matching-messages-on
test_expect_equal_file $EXPECTED/notmuch-show-elide-non-matching-messages-on OUTPUT
test_begin_subtest "notmuch-show: disable indentation of thread content (w/ notmuch-show-toggle-thread-indentation)"
test_emacs '(notmuch-search "from:lars@seas.harvard.edu and subject:\"Maildir storage\"")
@ -104,7 +104,7 @@ test_emacs '(notmuch-search "from:lars@seas.harvard.edu and subject:\"Maildir st
(notmuch-test-wait)
(notmuch-show-toggle-thread-indentation)
(test-visible-output)'
test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-indent-thread-content-off
test_expect_equal_file $EXPECTED/notmuch-show-indent-thread-content-off OUTPUT
test_begin_subtest "id buttonization"
add_message '[body]="
@ -161,7 +161,7 @@ cid:xxx
<<mid:abc>>. <<mid:abc>>, <<mid:abc>>;
EOF
notmuch_date_sanitize < OUTPUT.raw > OUTPUT
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "Show handles subprocess errors"

View file

@ -48,7 +48,7 @@ awk 'show {print} /^$/ {show=1}' < OUTPUT.raw > OUTPUT
cat <<EOF >EXPECTED
Yen: $UTF8_YEN
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "8bit text parts are decoded when rendering"
test_emacs '(notmuch-show "id:test-plain-8bit@example.com")
@ -57,7 +57,7 @@ awk 'show {print} /^$/ {show=1}' < OUTPUT.raw > OUTPUT
cat <<EOF >EXPECTED
Yen: $UTF8_YEN
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "HTML parts are decoded when rendering"
test_emacs '(notmuch-show "id:test-html@example.com")
@ -67,7 +67,7 @@ cat <<EOF >EXPECTED
[ text/html ]
Yen: $UTF8_YEN
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
# Test saving
@ -125,7 +125,7 @@ awk 'show {print} /^$/ {show=1}' < OUTPUT.raw > OUTPUT
cat <<EOF >EXPECTED
Yen: =A2=44
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "8bit text message are not decoded when viewing"
test_emacs '(notmuch-show "id:test-plain-8bit@example.com")
@ -135,6 +135,6 @@ awk 'show {print} /^$/ {show=1}' < OUTPUT.raw > OUTPUT
cat <<EOF >EXPECTED
Yen: $BIG5_YEN
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_done

View file

@ -12,7 +12,7 @@ test_emacs '(notmuch-tree "tag:inbox")
(notmuch-test-wait)
(test-output)
(delete-other-windows)'
test_expect_equal_file OUTPUT $EXPECTED/notmuch-tree-tag-inbox
test_expect_equal_file $EXPECTED/notmuch-tree-tag-inbox OUTPUT
test_begin_subtest "Refreshed notmuch-tree view in emacs"
test_emacs '(notmuch-tree "tag:inbox")
@ -21,7 +21,7 @@ test_emacs '(notmuch-tree "tag:inbox")
(notmuch-test-wait)
(test-output)
(delete-other-windows)'
test_expect_equal_file OUTPUT $EXPECTED/notmuch-tree-tag-inbox
test_expect_equal_file $EXPECTED/notmuch-tree-tag-inbox OUTPUT
# In the following tag tests we make sure the display is updated
# correctly and, in a separate test, that the database is updated
@ -34,7 +34,7 @@ test_emacs '(notmuch-tree "tag:inbox")
(notmuch-tree-tag (list "+test_tag"))
(test-output)
(delete-other-windows)'
test_expect_equal_file OUTPUT $EXPECTED/notmuch-tree-tag-inbox-tagged
test_expect_equal_file $EXPECTED/notmuch-tree-tag-inbox-tagged OUTPUT
test_begin_subtest "Tag message in notmuch tree view (database)"
output=$(notmuch search --output=messages 'tag:test_tag')
@ -47,7 +47,7 @@ test_emacs '(notmuch-tree "tag:inbox")
(notmuch-tree-tag (list "-test_tag"))
(test-output)
(delete-other-windows)'
test_expect_equal_file OUTPUT $EXPECTED/notmuch-tree-tag-inbox
test_expect_equal_file $EXPECTED/notmuch-tree-tag-inbox OUTPUT
test_begin_subtest "Untag message in notmuch tree view (database)"
output=$(notmuch search --output=messages 'tag:test_tag')
@ -61,7 +61,7 @@ test_emacs '(notmuch-tree "tag:inbox")
(notmuch-tree-tag-thread (list "+test_thread_tag"))
(test-output)
(delete-other-windows)'
test_expect_equal_file OUTPUT $EXPECTED/notmuch-tree-tag-inbox-thread-tagged
test_expect_equal_file $EXPECTED/notmuch-tree-tag-inbox-thread-tagged OUTPUT
test_begin_subtest "Tag message in notmuch tree view (database)"
output=$(notmuch search --output=messages 'tag:test_thread_tag')
@ -82,7 +82,7 @@ test_emacs '(notmuch-tree "tag:inbox")
(notmuch-tree-tag-thread (list "-test_thread_tag"))
(test-output)
(delete-other-windows)'
test_expect_equal_file OUTPUT $EXPECTED/notmuch-tree-tag-inbox
test_expect_equal_file $EXPECTED/notmuch-tree-tag-inbox OUTPUT
test_begin_subtest "Untag message in notmuch tree view (database)"
output=$(notmuch search --output=messages 'tag:test_thread_tag')
@ -98,7 +98,7 @@ test_emacs '(notmuch-hello)
(notmuch-test-wait)
(test-output)
(delete-other-windows)'
test_expect_equal_file OUTPUT $EXPECTED/notmuch-tree-tag-inbox
test_expect_equal_file $EXPECTED/notmuch-tree-tag-inbox OUTPUT
test_begin_subtest "Tree view of a single thread (from search)"
test_emacs '(notmuch-hello)
@ -110,7 +110,7 @@ test_emacs '(notmuch-hello)
(notmuch-test-wait)
(test-output)
(delete-other-windows)'
test_expect_equal_file OUTPUT $EXPECTED/notmuch-tree-single-thread
test_expect_equal_file $EXPECTED/notmuch-tree-single-thread OUTPUT
test_begin_subtest "Tree view of a single thread (from show)"
test_emacs '(notmuch-hello)
@ -123,7 +123,7 @@ test_emacs '(notmuch-hello)
(notmuch-test-wait)
(test-output)
(delete-other-windows)'
test_expect_equal_file OUTPUT $EXPECTED/notmuch-tree-single-thread
test_expect_equal_file $EXPECTED/notmuch-tree-single-thread OUTPUT
test_begin_subtest "Message window of tree view"
test_emacs '(notmuch-hello)
@ -138,7 +138,7 @@ test_emacs '(notmuch-hello)
(test-output)
(delete-other-windows)'
cp OUTPUT /tmp/mjwout
test_expect_equal_file OUTPUT $EXPECTED/notmuch-tree-show-window
test_expect_equal_file $EXPECTED/notmuch-tree-show-window OUTPUT
test_begin_subtest "Stash id"
output=$(test_emacs '(notmuch-tree "id:1258498485-sup-142@elly")

View file

@ -5,7 +5,7 @@ test_description="hex encoding and decoding"
test_begin_subtest "round trip"
find $TEST_DIRECTORY/corpus -type f -print | sort | xargs cat > EXPECTED
$TEST_DIRECTORY/hex-xcode --direction=encode < EXPECTED | $TEST_DIRECTORY/hex-xcode --direction=decode > OUTPUT
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "punctuation"
tag1='comic_swear=$&^%$^%\\//-+$^%$'
@ -28,7 +28,7 @@ test_begin_subtest "round trip (in-place)"
find $TEST_DIRECTORY/corpus -type f -print | sort | xargs cat > EXPECTED
$TEST_DIRECTORY/hex-xcode --in-place --direction=encode < EXPECTED |\
$TEST_DIRECTORY/hex-xcode --in-place --direction=decode > OUTPUT
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "punctuation (in-place)"
tag1='comic_swear=$&^%$^%\\//-+$^%$'

View file

@ -26,6 +26,6 @@ thread:XXX 2009-11-18 [1/2] Carl Worth| Jan Janak; [notmuch] [PATCH] Older ver
thread:XXX 2009-11-18 [1/3] Carl Worth| Aron Griffis, Keith Packard; [notmuch] archive (inbox unread)
thread:XXX 2009-11-18 [1/2] Carl Worth| Keith Packard; [notmuch] [PATCH] Make notmuch-show 'X' (and 'x') commands remove inbox (and unread) tags (inbox unread)
EOF
test_expect_equal_file OUTPUT EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_done