[PATCH 4/4] pick: rename test emacs-pick to emacs-tree
authorMark Walters <markwalters1009@gmail.com>
Sat, 26 Oct 2013 21:21:21 +0000 (22:21 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:57:40 +0000 (09:57 -0800)
20/4c763d429d8d0bc691c9cc1046e9cf117e18f4 [new file with mode: 0644]

diff --git a/20/4c763d429d8d0bc691c9cc1046e9cf117e18f4 b/20/4c763d429d8d0bc691c9cc1046e9cf117e18f4
new file mode 100644 (file)
index 0000000..245dfa3
--- /dev/null
@@ -0,0 +1,520 @@
+Return-Path: <markwalters1009@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 65969429E52\r
+       for <notmuch@notmuchmail.org>; Sat, 26 Oct 2013 14:21:42 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 1.514\r
+X-Spam-Level: *\r
+X-Spam-Status: No, score=1.514 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,\r
+       RCVD_IN_DNSWL_LOW=-0.7, URI_HEX=1.313] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id UeD6fmYcIeuG for <notmuch@notmuchmail.org>;\r
+       Sat, 26 Oct 2013 14:21:38 -0700 (PDT)\r
+Received: from mail-wg0-f44.google.com (mail-wg0-f44.google.com\r
+ [74.125.82.44])       (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
+ certificate requested)        by olra.theworths.org (Postfix) with ESMTPS id\r
+ B4FA0431FD9   for <notmuch@notmuchmail.org>; Sat, 26 Oct 2013 14:21:34 -0700\r
+ (PDT)\r
+Received: by mail-wg0-f44.google.com with SMTP id n12so5164919wgh.23\r
+       for <notmuch@notmuchmail.org>; Sat, 26 Oct 2013 14:21:33 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+       h=from:to:cc:subject:date:message-id:in-reply-to:references;\r
+       bh=+vltQD9SSHzx5DD4aO1EJt645EVg+mDqm/mqUOf1ME0=;\r
+       b=cfo7C3fly9ib4DGw47uryEeQQec2hTcv7In7IWHZAqeMO5z5vS8EaviXcExqZ68CeE\r
+       1OAs22Q6VjP+krYVn0VPwBiPjp1i78gfzHJ6XhGuciBIGEftrYBdRduPd8dkAixODzhD\r
+       LgMPsoj8KO66WhwPEW5gsFKy0qkiS1NjdInX9+wxj4n8DJtlLzkoT2F7swq3YJ+FDLJp\r
+       7chptoxqO7fcbs6aJK/2N09K47qC8JOiscWPIfzfyoDsg6ynBF+BsoTYOpMCAZp/mwh6\r
+       V33EYKEwgTAuAKTyw6kdhDtxhMQ1+YQv+0/J0VO1nsuhtKt1coutbkMs7SzYdH4so2pQ\r
+       DSyw==\r
+X-Received: by 10.194.240.129 with SMTP id wa1mr12383530wjc.31.1382822493376; \r
+       Sat, 26 Oct 2013 14:21:33 -0700 (PDT)\r
+Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31])\r
+       by mx.google.com with ESMTPSA id\r
+       by10sm18168845wib.10.2013.10.26.14.21.32 for <multiple recipients>\r
+       (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+       Sat, 26 Oct 2013 14:21:33 -0700 (PDT)\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 4/4] pick: rename test emacs-pick to emacs-tree\r
+Date: Sat, 26 Oct 2013 22:21:21 +0100\r
+Message-Id: <1382822481-26659-5-git-send-email-markwalters1009@gmail.com>\r
+X-Mailer: git-send-email 1.7.9.1\r
+In-Reply-To: <1382822481-26659-1-git-send-email-markwalters1009@gmail.com>\r
+References: <1382822481-26659-1-git-send-email-markwalters1009@gmail.com>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sat, 26 Oct 2013 21:21:42 -0000\r
+\r
+Also fixup run-tests.sh\r
+---\r
+ contrib/notmuch-pick/run-tests.sh    |    2 +-\r
+ contrib/notmuch-pick/test/emacs-pick |  210 ----------------------------------\r
+ contrib/notmuch-pick/test/emacs-tree |  210 ++++++++++++++++++++++++++++++++++\r
+ 3 files changed, 211 insertions(+), 211 deletions(-)\r
+ delete mode 100755 contrib/notmuch-pick/test/emacs-pick\r
+ create mode 100755 contrib/notmuch-pick/test/emacs-tree\r
+\r
+diff --git a/contrib/notmuch-pick/run-tests.sh b/contrib/notmuch-pick/run-tests.sh\r
+index 4832d72..1767949 100755\r
+--- a/contrib/notmuch-pick/run-tests.sh\r
++++ b/contrib/notmuch-pick/run-tests.sh\r
+@@ -7,7 +7,7 @@ fail() {\r
+     exit 1\r
+ }\r
\r
+-TESTS="emacs-pick"\r
++TESTS="emacs-tree"\r
+ TESTFILES="$TESTS tree.expected-output"\r
\r
+ export PICK_DIR="`cd \`dirname "$0"\` && pwd`"\r
+diff --git a/contrib/notmuch-pick/test/emacs-pick b/contrib/notmuch-pick/test/emacs-pick\r
+deleted file mode 100755\r
+index 05ce85d..0000000\r
+--- a/contrib/notmuch-pick/test/emacs-pick\r
++++ /dev/null\r
+@@ -1,210 +0,0 @@\r
+-#!/usr/bin/env bash\r
+-\r
+-test_description="emacs tree view interface"\r
+-. test-lib.sh\r
+-\r
+-EXPECTED=$TEST_DIRECTORY/tree.expected-output\r
+-\r
+-add_email_corpus\r
+-test_begin_subtest "Do we have emacs"\r
+-test_emacs '(insert "hello\n")\r
+-          (test-output)'\r
+-cat <<EOF >EXPECTED\r
+-hello\r
+-EOF\r
+-test_expect_equal_file OUTPUT EXPECTED\r
+-\r
+-test_begin_subtest "Basic notmuch-tree view in emacs"\r
+-test_emacs '(add-to-list (quote load-path) "'$PICK_DIR'")\r
+-          (require (quote notmuch-tree))\r
+-          (notmuch-tree "tag:inbox")\r
+-          (notmuch-test-wait)\r
+-          (test-output)\r
+-          (delete-other-windows)'\r
+-test_expect_equal_file OUTPUT $EXPECTED/notmuch-tree-tag-inbox\r
+-\r
+-test_begin_subtest "Refreshed notmuch-tree view in emacs"\r
+-test_emacs '(add-to-list (quote load-path) "'$PICK_DIR'")\r
+-          (require (quote notmuch-tree))\r
+-          (notmuch-tree "tag:inbox")\r
+-          (notmuch-test-wait)\r
+-          (notmuch-tree-refresh-view)\r
+-          (notmuch-test-wait)\r
+-          (test-output)\r
+-          (delete-other-windows)'\r
+-test_expect_equal_file OUTPUT $EXPECTED/notmuch-tree-tag-inbox\r
+-\r
+-# In the following tag tests we make sure the display is updated\r
+-# correctly and, in a separate test, that the database is updated\r
+-# correctly.\r
+-\r
+-test_begin_subtest "Tag message in notmuch tree view (display)"\r
+-test_emacs '(add-to-list (quote load-path) "'$PICK_DIR'")\r
+-          (require (quote notmuch-tree))\r
+-          (notmuch-tree "tag:inbox")\r
+-          (notmuch-test-wait)\r
+-          (forward-line)\r
+-          (notmuch-tree-tag (list "+test_tag"))\r
+-          (test-output)\r
+-          (delete-other-windows)'\r
+-test_expect_equal_file OUTPUT $EXPECTED/notmuch-tree-tag-inbox-tagged\r
+-\r
+-test_begin_subtest "Tag message in notmuch tree view (database)"\r
+-output=$(notmuch search --output=messages 'tag:test_tag')\r
+-test_expect_equal "$output" "id:877h1wv7mg.fsf@inf-8657.int-evry.fr"\r
+-\r
+-test_begin_subtest "Untag message in notmuch tree view"\r
+-test_emacs '(add-to-list (quote load-path) "'$PICK_DIR'")\r
+-          (require (quote notmuch-tree))\r
+-          (notmuch-tree "tag:inbox")\r
+-          (notmuch-test-wait)\r
+-          (forward-line)\r
+-          (notmuch-tree-tag (list "-test_tag"))\r
+-          (test-output)\r
+-          (delete-other-windows)'\r
+-test_expect_equal_file OUTPUT $EXPECTED/notmuch-tree-tag-inbox\r
+-\r
+-test_begin_subtest "Untag message in notmuch tree view (database)"\r
+-output=$(notmuch search --output=messages 'tag:test_tag')\r
+-test_expect_equal "$output" ""\r
+-\r
+-test_begin_subtest "Tag thread in notmuch tree view"\r
+-test_emacs '(add-to-list (quote load-path) "'$PICK_DIR'")\r
+-          (require (quote notmuch-tree))\r
+-          (notmuch-tree "tag:inbox")\r
+-          (notmuch-test-wait)\r
+-          ;; move to a sizable thread\r
+-          (forward-line 26)\r
+-          (notmuch-tree-tag-thread (list "+test_thread_tag"))\r
+-          (test-output)\r
+-          (delete-other-windows)'\r
+-test_expect_equal_file OUTPUT $EXPECTED/notmuch-tree-tag-inbox-thread-tagged\r
+-\r
+-test_begin_subtest "Tag message in notmuch tree view (database)"\r
+-output=$(notmuch search --output=messages 'tag:test_thread_tag')\r
+-test_expect_equal "$output" \\r
+-"id:87ocn0qh6d.fsf@yoom.home.cworth.org\r
+-id:20091118005040.GA25380@dottiness.seas.harvard.edu\r
+-id:yunaayketfm.fsf@aiko.keithp.com\r
+-id:87fx8can9z.fsf@vertex.dottedmag\r
+-id:20091117203301.GV3165@dottiness.seas.harvard.edu\r
+-id:87iqd9rn3l.fsf@vertex.dottedmag\r
+-id:20091117190054.GU3165@dottiness.seas.harvard.edu"\r
+-\r
+-test_begin_subtest "Untag thread in notmuch tree view"\r
+-test_emacs '(add-to-list (quote load-path) "'$PICK_DIR'")\r
+-          (require (quote notmuch-tree))\r
+-          (notmuch-tree "tag:inbox")\r
+-          (notmuch-test-wait)\r
+-          ;; move to the same sizable thread as above\r
+-          (forward-line 26)\r
+-          (notmuch-tree-tag-thread (list "-test_thread_tag"))\r
+-          (test-output)\r
+-          (delete-other-windows)'\r
+-test_expect_equal_file OUTPUT $EXPECTED/notmuch-tree-tag-inbox\r
+-\r
+-test_begin_subtest "Untag message in notmuch tree view (database)"\r
+-output=$(notmuch search --output=messages 'tag:test_thread_tag')\r
+-test_expect_equal "$output" ""\r
+-\r
+-test_begin_subtest "Navigation of notmuch-hello to search results"\r
+-test_emacs '(notmuch-hello)\r
+-          (goto-char (point-min))\r
+-          (re-search-forward "inbox")\r
+-          (widget-button-press (1- (point)))\r
+-          (notmuch-test-wait)\r
+-          (notmuch-tree-from-search-current-query)\r
+-          (notmuch-test-wait)\r
+-          (test-output)\r
+-          (delete-other-windows)'\r
+-test_expect_equal_file OUTPUT $EXPECTED/notmuch-tree-tag-inbox\r
+-\r
+-test_begin_subtest "Tree view of a single thread (from search)"\r
+-test_emacs '(notmuch-hello)\r
+-          (goto-char (point-min))\r
+-          (re-search-forward "inbox")\r
+-          (widget-button-press (1- (point)))\r
+-          (notmuch-test-wait)\r
+-          (notmuch-tree-from-search-thread)\r
+-          (notmuch-test-wait)\r
+-          (test-output)\r
+-          (delete-other-windows)'\r
+-test_expect_equal_file OUTPUT $EXPECTED/notmuch-tree-single-thread\r
+-\r
+-test_begin_subtest "Tree view of a single thread (from show)"\r
+-test_emacs '(notmuch-hello)\r
+-          (goto-char (point-min))\r
+-          (re-search-forward "inbox")\r
+-          (widget-button-press (1- (point)))\r
+-          (notmuch-test-wait)\r
+-          (notmuch-search-show-thread)\r
+-          (notmuch-tree-from-show-current-query)\r
+-          (notmuch-test-wait)\r
+-          (test-output)\r
+-          (delete-other-windows)'\r
+-test_expect_equal_file OUTPUT $EXPECTED/notmuch-tree-single-thread\r
+-\r
+-test_begin_subtest "Message window of tree view"\r
+-test_emacs '(notmuch-hello)\r
+-          (goto-char (point-min))\r
+-          (re-search-forward "inbox")\r
+-          (widget-button-press (1- (point)))\r
+-          (notmuch-test-wait)\r
+-          (notmuch-search-next-thread)\r
+-          (notmuch-tree-from-search-thread)\r
+-          (notmuch-test-wait)\r
+-          (select-window notmuch-tree-message-window)\r
+-          (test-output)\r
+-          (delete-other-windows)'\r
+-cp OUTPUT /tmp/mjwout\r
+-test_expect_equal_file OUTPUT $EXPECTED/notmuch-tree-show-window\r
+-\r
+-test_begin_subtest "Stash id"\r
+-output=$(test_emacs '(add-to-list (quote load-path) "'$PICK_DIR'")\r
+-                   (require (quote notmuch-tree))\r
+-                   (notmuch-tree "id:1258498485-sup-142@elly")\r
+-                   (notmuch-test-wait)\r
+-                   (notmuch-show-stash-message-id)')\r
+-test_expect_equal "$output" "\"Stashed: id:1258498485-sup-142@elly\""\r
+-\r
+-test_begin_subtest "Move to next matching message"\r
+-output=$(test_emacs '(add-to-list (quote load-path) "'$PICK_DIR'")\r
+-                   (require (quote notmuch-tree))\r
+-                   (notmuch-tree "from:cworth")\r
+-                   (notmuch-test-wait)\r
+-                   (notmuch-tree-next-matching-message)\r
+-                   (notmuch-show-stash-message-id)')\r
+-test_expect_equal "$output" "\"Stashed: id:878we4qdqf.fsf@yoom.home.cworth.org\""\r
+-\r
+-test_begin_subtest "Move to next thread"\r
+-output=$(test_emacs '(add-to-list (quote load-path) "'$PICK_DIR'")\r
+-                   (require (quote notmuch-tree))\r
+-                   (notmuch-tree "tag:inbox")\r
+-                   (notmuch-test-wait)\r
+-                   (forward-line 26)\r
+-                   (notmuch-tree-next-thread)\r
+-                   (notmuch-show-stash-message-id)')\r
+-test_expect_equal "$output" "\"Stashed: id:1258471718-6781-1-git-send-email-dottedmag@dottedmag.net\""\r
+-\r
+-test_begin_subtest "Move to previous thread"\r
+-output=$(test_emacs '(add-to-list (quote load-path) "'$PICK_DIR'")\r
+-                   (require (quote notmuch-tree))\r
+-                   (notmuch-tree "tag:inbox")\r
+-                   (notmuch-test-wait)\r
+-                   (forward-line 26)\r
+-                   (notmuch-tree-prev-thread)\r
+-                   (notmuch-show-stash-message-id)')\r
+-test_expect_equal "$output" "\"Stashed: id:20091117190054.GU3165@dottiness.seas.harvard.edu\""\r
+-\r
+-test_begin_subtest "Move to previous previous thread"\r
+-output=$(test_emacs '(add-to-list (quote load-path) "'$PICK_DIR'")\r
+-                   (require (quote notmuch-tree))\r
+-                   (notmuch-tree "tag:inbox")\r
+-                   (notmuch-test-wait)\r
+-                   (forward-line 26)\r
+-                   (notmuch-tree-prev-thread)\r
+-                   (notmuch-tree-prev-thread)\r
+-                   (notmuch-show-stash-message-id)')\r
+-test_expect_equal "$output" "\"Stashed: id:1258493565-13508-1-git-send-email-keithp@keithp.com\""\r
+-\r
+-test_done\r
+diff --git a/contrib/notmuch-pick/test/emacs-tree b/contrib/notmuch-pick/test/emacs-tree\r
+new file mode 100755\r
+index 0000000..05ce85d\r
+--- /dev/null\r
++++ b/contrib/notmuch-pick/test/emacs-tree\r
+@@ -0,0 +1,210 @@\r
++#!/usr/bin/env bash\r
++\r
++test_description="emacs tree view interface"\r
++. test-lib.sh\r
++\r
++EXPECTED=$TEST_DIRECTORY/tree.expected-output\r
++\r
++add_email_corpus\r
++test_begin_subtest "Do we have emacs"\r
++test_emacs '(insert "hello\n")\r
++          (test-output)'\r
++cat <<EOF >EXPECTED\r
++hello\r
++EOF\r
++test_expect_equal_file OUTPUT EXPECTED\r
++\r
++test_begin_subtest "Basic notmuch-tree view in emacs"\r
++test_emacs '(add-to-list (quote load-path) "'$PICK_DIR'")\r
++          (require (quote notmuch-tree))\r
++          (notmuch-tree "tag:inbox")\r
++          (notmuch-test-wait)\r
++          (test-output)\r
++          (delete-other-windows)'\r
++test_expect_equal_file OUTPUT $EXPECTED/notmuch-tree-tag-inbox\r
++\r
++test_begin_subtest "Refreshed notmuch-tree view in emacs"\r
++test_emacs '(add-to-list (quote load-path) "'$PICK_DIR'")\r
++          (require (quote notmuch-tree))\r
++          (notmuch-tree "tag:inbox")\r
++          (notmuch-test-wait)\r
++          (notmuch-tree-refresh-view)\r
++          (notmuch-test-wait)\r
++          (test-output)\r
++          (delete-other-windows)'\r
++test_expect_equal_file OUTPUT $EXPECTED/notmuch-tree-tag-inbox\r
++\r
++# In the following tag tests we make sure the display is updated\r
++# correctly and, in a separate test, that the database is updated\r
++# correctly.\r
++\r
++test_begin_subtest "Tag message in notmuch tree view (display)"\r
++test_emacs '(add-to-list (quote load-path) "'$PICK_DIR'")\r
++          (require (quote notmuch-tree))\r
++          (notmuch-tree "tag:inbox")\r
++          (notmuch-test-wait)\r
++          (forward-line)\r
++          (notmuch-tree-tag (list "+test_tag"))\r
++          (test-output)\r
++          (delete-other-windows)'\r
++test_expect_equal_file OUTPUT $EXPECTED/notmuch-tree-tag-inbox-tagged\r
++\r
++test_begin_subtest "Tag message in notmuch tree view (database)"\r
++output=$(notmuch search --output=messages 'tag:test_tag')\r
++test_expect_equal "$output" "id:877h1wv7mg.fsf@inf-8657.int-evry.fr"\r
++\r
++test_begin_subtest "Untag message in notmuch tree view"\r
++test_emacs '(add-to-list (quote load-path) "'$PICK_DIR'")\r
++          (require (quote notmuch-tree))\r
++          (notmuch-tree "tag:inbox")\r
++          (notmuch-test-wait)\r
++          (forward-line)\r
++          (notmuch-tree-tag (list "-test_tag"))\r
++          (test-output)\r
++          (delete-other-windows)'\r
++test_expect_equal_file OUTPUT $EXPECTED/notmuch-tree-tag-inbox\r
++\r
++test_begin_subtest "Untag message in notmuch tree view (database)"\r
++output=$(notmuch search --output=messages 'tag:test_tag')\r
++test_expect_equal "$output" ""\r
++\r
++test_begin_subtest "Tag thread in notmuch tree view"\r
++test_emacs '(add-to-list (quote load-path) "'$PICK_DIR'")\r
++          (require (quote notmuch-tree))\r
++          (notmuch-tree "tag:inbox")\r
++          (notmuch-test-wait)\r
++          ;; move to a sizable thread\r
++          (forward-line 26)\r
++          (notmuch-tree-tag-thread (list "+test_thread_tag"))\r
++          (test-output)\r
++          (delete-other-windows)'\r
++test_expect_equal_file OUTPUT $EXPECTED/notmuch-tree-tag-inbox-thread-tagged\r
++\r
++test_begin_subtest "Tag message in notmuch tree view (database)"\r
++output=$(notmuch search --output=messages 'tag:test_thread_tag')\r
++test_expect_equal "$output" \\r
++"id:87ocn0qh6d.fsf@yoom.home.cworth.org\r
++id:20091118005040.GA25380@dottiness.seas.harvard.edu\r
++id:yunaayketfm.fsf@aiko.keithp.com\r
++id:87fx8can9z.fsf@vertex.dottedmag\r
++id:20091117203301.GV3165@dottiness.seas.harvard.edu\r
++id:87iqd9rn3l.fsf@vertex.dottedmag\r
++id:20091117190054.GU3165@dottiness.seas.harvard.edu"\r
++\r
++test_begin_subtest "Untag thread in notmuch tree view"\r
++test_emacs '(add-to-list (quote load-path) "'$PICK_DIR'")\r
++          (require (quote notmuch-tree))\r
++          (notmuch-tree "tag:inbox")\r
++          (notmuch-test-wait)\r
++          ;; move to the same sizable thread as above\r
++          (forward-line 26)\r
++          (notmuch-tree-tag-thread (list "-test_thread_tag"))\r
++          (test-output)\r
++          (delete-other-windows)'\r
++test_expect_equal_file OUTPUT $EXPECTED/notmuch-tree-tag-inbox\r
++\r
++test_begin_subtest "Untag message in notmuch tree view (database)"\r
++output=$(notmuch search --output=messages 'tag:test_thread_tag')\r
++test_expect_equal "$output" ""\r
++\r
++test_begin_subtest "Navigation of notmuch-hello to search results"\r
++test_emacs '(notmuch-hello)\r
++          (goto-char (point-min))\r
++          (re-search-forward "inbox")\r
++          (widget-button-press (1- (point)))\r
++          (notmuch-test-wait)\r
++          (notmuch-tree-from-search-current-query)\r
++          (notmuch-test-wait)\r
++          (test-output)\r
++          (delete-other-windows)'\r
++test_expect_equal_file OUTPUT $EXPECTED/notmuch-tree-tag-inbox\r
++\r
++test_begin_subtest "Tree view of a single thread (from search)"\r
++test_emacs '(notmuch-hello)\r
++          (goto-char (point-min))\r
++          (re-search-forward "inbox")\r
++          (widget-button-press (1- (point)))\r
++          (notmuch-test-wait)\r
++          (notmuch-tree-from-search-thread)\r
++          (notmuch-test-wait)\r
++          (test-output)\r
++          (delete-other-windows)'\r
++test_expect_equal_file OUTPUT $EXPECTED/notmuch-tree-single-thread\r
++\r
++test_begin_subtest "Tree view of a single thread (from show)"\r
++test_emacs '(notmuch-hello)\r
++          (goto-char (point-min))\r
++          (re-search-forward "inbox")\r
++          (widget-button-press (1- (point)))\r
++          (notmuch-test-wait)\r
++          (notmuch-search-show-thread)\r
++          (notmuch-tree-from-show-current-query)\r
++          (notmuch-test-wait)\r
++          (test-output)\r
++          (delete-other-windows)'\r
++test_expect_equal_file OUTPUT $EXPECTED/notmuch-tree-single-thread\r
++\r
++test_begin_subtest "Message window of tree view"\r
++test_emacs '(notmuch-hello)\r
++          (goto-char (point-min))\r
++          (re-search-forward "inbox")\r
++          (widget-button-press (1- (point)))\r
++          (notmuch-test-wait)\r
++          (notmuch-search-next-thread)\r
++          (notmuch-tree-from-search-thread)\r
++          (notmuch-test-wait)\r
++          (select-window notmuch-tree-message-window)\r
++          (test-output)\r
++          (delete-other-windows)'\r
++cp OUTPUT /tmp/mjwout\r
++test_expect_equal_file OUTPUT $EXPECTED/notmuch-tree-show-window\r
++\r
++test_begin_subtest "Stash id"\r
++output=$(test_emacs '(add-to-list (quote load-path) "'$PICK_DIR'")\r
++                   (require (quote notmuch-tree))\r
++                   (notmuch-tree "id:1258498485-sup-142@elly")\r
++                   (notmuch-test-wait)\r
++                   (notmuch-show-stash-message-id)')\r
++test_expect_equal "$output" "\"Stashed: id:1258498485-sup-142@elly\""\r
++\r
++test_begin_subtest "Move to next matching message"\r
++output=$(test_emacs '(add-to-list (quote load-path) "'$PICK_DIR'")\r
++                   (require (quote notmuch-tree))\r
++                   (notmuch-tree "from:cworth")\r
++                   (notmuch-test-wait)\r
++                   (notmuch-tree-next-matching-message)\r
++                   (notmuch-show-stash-message-id)')\r
++test_expect_equal "$output" "\"Stashed: id:878we4qdqf.fsf@yoom.home.cworth.org\""\r
++\r
++test_begin_subtest "Move to next thread"\r
++output=$(test_emacs '(add-to-list (quote load-path) "'$PICK_DIR'")\r
++                   (require (quote notmuch-tree))\r
++                   (notmuch-tree "tag:inbox")\r
++                   (notmuch-test-wait)\r
++                   (forward-line 26)\r
++                   (notmuch-tree-next-thread)\r
++                   (notmuch-show-stash-message-id)')\r
++test_expect_equal "$output" "\"Stashed: id:1258471718-6781-1-git-send-email-dottedmag@dottedmag.net\""\r
++\r
++test_begin_subtest "Move to previous thread"\r
++output=$(test_emacs '(add-to-list (quote load-path) "'$PICK_DIR'")\r
++                   (require (quote notmuch-tree))\r
++                   (notmuch-tree "tag:inbox")\r
++                   (notmuch-test-wait)\r
++                   (forward-line 26)\r
++                   (notmuch-tree-prev-thread)\r
++                   (notmuch-show-stash-message-id)')\r
++test_expect_equal "$output" "\"Stashed: id:20091117190054.GU3165@dottiness.seas.harvard.edu\""\r
++\r
++test_begin_subtest "Move to previous previous thread"\r
++output=$(test_emacs '(add-to-list (quote load-path) "'$PICK_DIR'")\r
++                   (require (quote notmuch-tree))\r
++                   (notmuch-tree "tag:inbox")\r
++                   (notmuch-test-wait)\r
++                   (forward-line 26)\r
++                   (notmuch-tree-prev-thread)\r
++                   (notmuch-tree-prev-thread)\r
++                   (notmuch-show-stash-message-id)')\r
++test_expect_equal "$output" "\"Stashed: id:1258493565-13508-1-git-send-email-keithp@keithp.com\""\r
++\r
++test_done\r
+-- \r
+1.7.9.1\r
+\r