diff options
author | Dmitry Kurochkin <dmitry.kurochkin@gmail.com> | 2011-05-10 07:30:51 +0400 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2011-05-31 15:10:27 -0700 |
commit | 5a7a1d499786f103dfdbd81e30ead72aad214ac1 (patch) | |
tree | ad9699ae5ae4ea4a870d661ba89f1c144db5b908 /test | |
parent | 59a9c36316293b161528097a73c72d5f5ed58781 (diff) |
test: add test for saving attachments using notmuch-show-save-part
Use .gz filenames for saved attachments in the tests to check
that Emacs does not re-compress the file.
Use test_expect_equal_file instead of test_expect_equal to avoid
binary output on the console.
Diffstat (limited to 'test')
-rwxr-xr-x | test/emacs | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -112,11 +112,15 @@ Fcc: $(pwd)/mail/sent On Fri, 29 Mar 1974 10:00:00 -0000, Notmuch Test Suite <test_suite@notmuchmail.org> wrote: > This is a test that messages are sent via SMTP" -test_begin_subtest "Save attachment from within emacs" -echo "./attachment" | test_emacs '(notmuch-show "id:cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com") (notmuch-show-save-attachments)' > /dev/null 2>&1 -output=$(cat attachment) -expected=$(cat $EXPECTED/attachment) -test_expect_equal "$output" "$expected" +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 +echo ./attachment1.gz | test_emacs '(notmuch-show "id:cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com") (notmuch-show-save-attachments)' > /dev/null 2>&1 +test_expect_equal_file "$EXPECTED/attachment" attachment1.gz + +test_begin_subtest "Save attachment from within emacs using notmuch-show-save-part" +# save as archive to test that Emacs does not re-compress .gz +echo ./attachment2.gz | test_emacs '(notmuch-show-save-part "id:cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com" 5)' > /dev/null 2>&1 +test_expect_equal_file "$EXPECTED/attachment" attachment2.gz test_begin_subtest "View raw message within emacs" expected=$(cat $EXPECTED/raw-message-cf0c4d-52ad0a) |