[PATCH 2/2] test: move all emacs show tests to emacs-show test script

2012-08-31 Thread David Bremner
Jameson Graef Rollins  writes:

> No functional change.
>
> Most notmuch-show mode tests were in the emacs script, while some were
> in the emacs-show script.  This moves all the notmuch-show mode tests
> to the emacs-show script, to make things a little more consistent.

This seems harmless enough, and independent of the the other patch in
the series, but I broke it with one fixes for emacs24. Interested in
rebasing it?

d


[PATCH 2/2] test: move all emacs show tests to emacs-show test script

2012-08-12 Thread Jameson Graef Rollins
No functional change.

Most notmuch-show mode tests were in the emacs script, while some were
in the emacs-show script.  This moves all the notmuch-show mode tests
to the emacs-show script, to make things a little more consistent.
---
This patch is not necessary, but I think it makes the emacs tests
clearer, by not having tests for show-mode split across multiple test
scripts.

 test/emacs  |  397 +
 test/emacs-show |  409 +++
 2 files changed, 410 insertions(+), 396 deletions(-)

diff --git a/test/emacs b/test/emacs
index afe35ba..9cb5795 100755
--- a/test/emacs
+++ b/test/emacs
@@ -54,49 +54,6 @@ test_emacs '(notmuch-hello)
(test-output)'
 test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-view-inbox

-test_begin_subtest "Basic notmuch-show view in emacs"
-maildir_storage_thread=$(notmuch search --output=threads 
id:20091117190054.GU3165 at 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_begin_subtest "Basic notmuch-show view in emacs default indentation"
-maildir_storage_thread=$(notmuch search --output=threads 
id:20091117190054.GU3165 at 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_begin_subtest "Basic notmuch-show view in emacs without indentation"
-maildir_storage_thread=$(notmuch search --output=threads 
id:20091117190054.GU3165 at 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_begin_subtest "Basic notmuch-show view in emacs with fourfold indentation"
-maildir_storage_thread=$(notmuch search --output=threads 
id:20091117190054.GU3165 at 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_begin_subtest "notmuch-show for message with invalid From"
-add_message "[subject]=\"message-with-invalid-from\"" \
-   "[from]=\"\\\"Invalid \\\" From\\\" \""
-thread=$(notmuch search --output=threads subject:message-with-invalid-from)
-test_emacs "(notmuch-show \"$thread\")
-   (test-output)"
-cat 

[PATCH 2/2] test: move all emacs show tests to emacs-show test script

2012-08-12 Thread Jameson Graef Rollins
No functional change.

Most notmuch-show mode tests were in the emacs script, while some were
in the emacs-show script.  This moves all the notmuch-show mode tests
to the emacs-show script, to make things a little more consistent.
---
This patch is not necessary, but I think it makes the emacs tests
clearer, by not having tests for show-mode split across multiple test
scripts.

 test/emacs  |  397 +
 test/emacs-show |  409 +++
 2 files changed, 410 insertions(+), 396 deletions(-)

diff --git a/test/emacs b/test/emacs
index afe35ba..9cb5795 100755
--- a/test/emacs
+++ b/test/emacs
@@ -54,49 +54,6 @@ test_emacs '(notmuch-hello)
(test-output)'
 test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-view-inbox
 
-test_begin_subtest Basic notmuch-show view in emacs
-maildir_storage_thread=$(notmuch search --output=threads 
id:20091117190054.gu3...@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_begin_subtest Basic notmuch-show view in emacs default indentation
-maildir_storage_thread=$(notmuch search --output=threads 
id:20091117190054.gu3...@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_begin_subtest Basic notmuch-show view in emacs without indentation
-maildir_storage_thread=$(notmuch search --output=threads 
id:20091117190054.gu3...@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_begin_subtest Basic notmuch-show view in emacs with fourfold indentation
-maildir_storage_thread=$(notmuch search --output=threads 
id:20091117190054.gu3...@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_begin_subtest notmuch-show for message with invalid From
-add_message [subject]=\message-with-invalid-from\ \
-   [from]=Invalid \\\ From\\\ test_su...@notmuchmail.org\
-thread=$(notmuch search --output=threads subject:message-with-invalid-from)
-test_emacs (notmuch-show \$thread\)
-   (test-output)
-cat EOF EXPECTED
-Invalid  (2001-01-05) (inbox)
-Subject: message-with-invalid-from
-To: Notmuch Test Suite test_su...@notmuchmail.org
-Date: Fri, 05 Jan 2001 15:43:57 +
-
-This is just a test message (#1)
-EOF
-test_expect_equal_file OUTPUT EXPECTED
-
 test_begin_subtest Navigation of notmuch-search to thread view
 test_emacs '(notmuch-search tag:inbox)
(notmuch-test-wait)
@@ -122,18 +79,6 @@ test_emacs (notmuch-search \$os_x_darwin_thread\)
 output=$(notmuch search $os_x_darwin_thread | notmuch_search_sanitize)
 test_expect_equal $output thread:XXX   2009-11-18 [4/4] Jjgod Jiang, 
Alexander Botero-Lowry; [notmuch] Mac OS X/Darwin compatibility issues (inbox 
unread)
 
-test_begin_subtest Add tag from notmuch-show view
-test_emacs (notmuch-show \$os_x_darwin_thread\)
-   (execute-kbd-macro \+tag-from-show-view\)
-output=$(notmuch search $os_x_darwin_thread | notmuch_search_sanitize)
-test_expect_equal $output thread:XXX   2009-11-18 [4/4] Jjgod Jiang, 
Alexander Botero-Lowry; [notmuch] Mac OS X/Darwin compatibility issues (inbox 
tag-from-show-view unread)
-
-test_begin_subtest Remove tag from notmuch-show view
-test_emacs (notmuch-show \$os_x_darwin_thread\)
-   (execute-kbd-macro \-tag-from-show-view\)
-output=$(notmuch search $os_x_darwin_thread | notmuch_search_sanitize)
-test_expect_equal $output thread:XXX   2009-11-18 [4/4] Jjgod Jiang, 
Alexander Botero-Lowry; [notmuch] Mac OS X/Darwin compatibility issues (inbox 
unread)
-
 test_begin_subtest Message with .. in Message-Id:
 add_message [id]=123..456@example '[subject]=Message with .. in Message-Id'
 test_emacs '(notmuch-search id:\123..456@example\)
@@ -351,248 +296,7 @@ Sender sen...@example.com writes:
 EOF
 test_expect_equal_file OUTPUT EXPECTED
 
-test_begin_subtest Reply within emacs to a multipart/mixed message
-test_emacs '(let ((message-hidden-headers ''()))
-   (notmuch-show id:20091118002059.067214ed@hikari)
-   (notmuch-show-reply)
-   (test-output))'
-sed -i -e 's,^User-Agent: Notmuch/.* Emacs/.*,User-Agent: Notmuch/XXX 
Emacs/XXX,' OUTPUT
-cat EOF EXPECTED
-From: Notmuch Test Suite test_su...@notmuchmail.org
-To: Adrian Perez de Castro ape...@igalia.com,