diff options
| author | David Bremner <david@tethera.net> | 2019-03-24 00:32:44 -0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2019-05-03 07:48:43 -0300 |
| commit | 103c11822ee0b7645fda6397fb40f8ac7ed9b49b (patch) | |
| tree | b79cd49890038023cec5b1ee588f2684ad8b2c10 /test | |
| parent | 852167479f552cd396b1fdcbe9b1cb4db40e5e0a (diff) | |
cli/notmuch-show: support gzipped files
This drops "file" from mime_node_context and just uses a local
variable. It also uses the new gzip aware utility routines recently
added to util/gmime-extra.c. The use of gzopen / gzfile in addition is
a bit icky, but the choice is between that, and providing yet another
readline implimentation that understands GMime streams.
Diffstat (limited to 'test')
| -rwxr-xr-x | test/T750-gzip.sh | 57 |
1 files changed, 56 insertions, 1 deletions
diff --git a/test/T750-gzip.sh b/test/T750-gzip.sh index 96464956..5b678fa1 100755 --- a/test/T750-gzip.sh +++ b/test/T750-gzip.sh @@ -91,8 +91,35 @@ This is just a test message (#6) EOF test_expect_equal_file EXPECTED OUTPUT +test_begin_subtest "show un-gzipped message (format mbox)" +notmuch show --format=mbox id:msg-006@notmuch-test-suite | notmuch_show_sanitize > OUTPUT +cat <<EOF > EXPECTED +From test_suite@notmuchmail.org Fri Jan 5 15:43:51 2001 +From: Notmuch Test Suite <test_suite@notmuchmail.org> +To: Notmuch Test Suite <test_suite@notmuchmail.org> +Message-Id: <msg-006@notmuch-test-suite> +Subject: Multiple new messages, one gzipped (full-scan) +Date: Fri, 05 Jan 2001 15:43:51 +0000 + +This is just a test message (#6) + +EOF +test_expect_equal_file EXPECTED OUTPUT + +test_begin_subtest "show un-gzipped message (format raw)" +notmuch show --format=raw id:msg-006@notmuch-test-suite | notmuch_show_sanitize > OUTPUT +cat <<EOF > EXPECTED +From: Notmuch Test Suite <test_suite@notmuchmail.org> +To: Notmuch Test Suite <test_suite@notmuchmail.org> +Message-Id: <msg-006@notmuch-test-suite> +Subject: Multiple new messages, one gzipped (full-scan) +Date: Fri, 05 Jan 2001 15:43:51 +0000 + +This is just a test message (#6) +EOF +test_expect_equal_file EXPECTED OUTPUT + test_begin_subtest "show gzipped message" -test_subtest_known_broken notmuch show id:msg-007@notmuch-test-suite | notmuch_show_sanitize > OUTPUT cat <<EOF > EXPECTED message{ id:msg-007@notmuch-test-suite depth:0 match:1 excluded:0 filename:/XXX/mail/msg-007.gz @@ -112,4 +139,32 @@ This is just a test message (#7) EOF test_expect_equal_file EXPECTED OUTPUT +test_begin_subtest "show gzipped message (mbox)" +notmuch show --format=mbox id:msg-007@notmuch-test-suite | notmuch_show_sanitize > OUTPUT +cat <<EOF > EXPECTED +From test_suite@notmuchmail.org Fri Jan 5 15:43:50 2001 +From: Notmuch Test Suite <test_suite@notmuchmail.org> +To: Notmuch Test Suite <test_suite@notmuchmail.org> +Message-Id: <msg-007@notmuch-test-suite> +Subject: Renamed (gzipped) message +Date: Fri, 05 Jan 2001 15:43:50 +0000 + +This is just a test message (#7) + +EOF +test_expect_equal_file EXPECTED OUTPUT + +test_begin_subtest "show gzipped message (raw)" +notmuch show --format=raw id:msg-007@notmuch-test-suite | notmuch_show_sanitize > OUTPUT +cat <<EOF > EXPECTED +From: Notmuch Test Suite <test_suite@notmuchmail.org> +To: Notmuch Test Suite <test_suite@notmuchmail.org> +Message-Id: <msg-007@notmuch-test-suite> +Subject: Renamed (gzipped) message +Date: Fri, 05 Jan 2001 15:43:50 +0000 + +This is just a test message (#7) +EOF +test_expect_equal_file EXPECTED OUTPUT + test_done |
