From 2d4b3e33481baf98a2bf185304d693855dca296a Mon Sep 17 00:00:00 2001
From: Carl Worth <cworth@cworth.org>
Date: Fri, 5 Nov 2010 13:59:45 -0700
Subject: [PATCH] test: Clear the "BROKEN" flag on an existing emacs test

I still don't know everything about how I want search order to be
customizable, but I do like the current defaults, (namely, performing
a new search gives results newest first, but performing a saved search
like "tag:inbox" gives results as oldest first).

Until we come up with a better plan for people to select what *they*
want, (rather than just getting what I want), let's codify the current
results in the test suite.
---
 test/emacs                                    |  6 ++---
 .../notmuch-hello-view-inbox                  | 23 +++++++++++++++++++
 2 files changed, 26 insertions(+), 3 deletions(-)
 create mode 100644 test/emacs.expected-output/notmuch-hello-view-inbox

diff --git a/test/emacs b/test/emacs
index 97f46286..c6b92677 100755
--- a/test/emacs
+++ b/test/emacs
@@ -26,10 +26,10 @@ output=$(test_emacs '(notmuch-search "tag:inbox") (notmuch-test-wait) (message (
 expected=$(cat $EXPECTED/notmuch-search-tag-inbox)
 test_expect_equal "$output" "$expected"
 
-test_begin_subtest "Navigation of notmuch-hello to search results
-	[XXX: Need to decide the correct order of the search results]"
+test_begin_subtest "Navigation of notmuch-hello to search results"
 output=$(test_emacs '(notmuch-hello) (goto-char (point-min)) (re-search-forward "inbox") (widget-button-press (point)) (notmuch-test-wait) (message (buffer-string))' 2>&1)
-test_expect_equal_failure "$output" "$expected"
+expected=$(cat $EXPECTED/notmuch-hello-view-inbox)
+test_expect_equal "$output" "$expected"
 
 test_begin_subtest "Basic notmuch-show view in emacs"
 maildir_storage_thread=$(notmuch search --output=threads id:20091117190054.GU3165@dottiness.seas.harvard.edu)
diff --git a/test/emacs.expected-output/notmuch-hello-view-inbox b/test/emacs.expected-output/notmuch-hello-view-inbox
new file mode 100644
index 00000000..8f44411f
--- /dev/null
+++ b/test/emacs.expected-output/notmuch-hello-view-inbox
@@ -0,0 +1,23 @@
+  2009-11-17 [5/5]   Carl Worth, Keith Packard, Mikhail Gusarov [notmuch] [PATCH 1/2] Close message file after parsing message headers (inbox unread)
+  2009-11-17 [7/7]   Carl Worth, Lars Kellogg-Stedman, Keith Packard, Mikhail Gusarov [notmuch] Working with Maildir storage? (inbox unread)
+  2009-11-17 [2/2]   Carl Worth, Alex Botero-Lowry [notmuch] preliminary FreeBSD support (inbox unread)
+  2009-11-17 [1/1]   Mikhail Gusarov      [notmuch] [PATCH] Handle rename of message file (inbox unread)
+  2009-11-17 [2/2]   Carl Worth, Keith Packard [notmuch] [PATCH] Make notmuch-show 'X' (and 'x') commands remove inbox (and unread) tags (inbox unread)
+  2009-11-17 [2/2]   Carl Worth, Jan Janak [notmuch] [PATCH] Older versions of install do not support -C. (inbox unread)
+  2009-11-17 [3/3]   Carl Worth, Jan Janak [notmuch] What a great idea! (inbox unread)
+  2009-11-17 [3/3]   Carl Worth, Keith Packard, Israel Herraiz [notmuch] New to the list (inbox unread)
+  2009-11-17 [3/3]   Carl Worth, Keith Packard, Adrian Perez de Castro [notmuch] Introducing myself (inbox unread)
+  2009-11-17 [3/3]   Carl Worth, Keith Packard, Aron Griffis [notmuch] archive (inbox unread)
+  2009-11-17 [2/2]   Carl Worth, Ingmar Vanhassel [notmuch] [PATCH] Typsos (inbox unread)
+  2009-11-18 [2/2]   Carl Worth, Alex Botero-Lowry [notmuch] [PATCH] Error out if no query is supplied to search instead of going into an infinite loop (inbox unread)
+  2009-11-18 [2/2]   Lars Kellogg-Stedman [notmuch] "notmuch help" outputs to stderr? (inbox unread)
+  2009-11-18 [1/1]   Stewart Smith        [notmuch] [PATCH] Fix linking with gcc to use g++ to link in C++ libs. (inbox unread)
+  2009-11-18 [1/1]   Stewart Smith        [notmuch] [PATCH 2/2] Read mail directory in inode number order (inbox unread)
+  2009-11-18 [1/1]   Stewart Smith        [notmuch] [PATCH] count_files: sort directory in inode order before statting (inbox unread)
+  2009-11-18 [4/4]   Alexander Botero-Lowry, Jjgod Jiang [notmuch] Mac OS X/Darwin compatibility issues (inbox unread)
+  2009-11-18 [1/1]   Jan Janak            [notmuch] [PATCH] notmuch new: Support for conversion of spool subdirectories into tags (inbox unread)
+  2009-11-18 [1/1]   Rolland Santimano    [notmuch] Link to mailing list archives ? (inbox unread)
+  2009-11-18 [1/1]   Alexander Botero-Lowry [notmuch] request for pull (inbox unread)
+  2009-11-18 [2/2]   Alexander Botero-Lowry, Keith Packard [notmuch] [PATCH] Create a default notmuch-show-hook that highlights URLs and uses word-wrap (inbox unread)
+  2009-11-18 [1/1]   Chris Wilson         [notmuch] [PATCH 1/2] Makefile: evaluate pkg-config once (inbox unread)
+End of search results.
-- 
2.45.2