[PATCH 03/15] test: add known broken tests for "ghost roots"
David Bremner
david at tethera.net
Mon Jul 30 15:45:43 PDT 2018
This documents the bug discussed at
id:87efgmmysi.fsf at len.workgroup
The underlying issue is that the reply to a ghost (missing) message is
falsely classified as a root message in _resolve_thread_relationships.
The first test is simpler / more robust, but also easier to fool.
---
test/T510-thread-replies.sh | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/test/T510-thread-replies.sh b/test/T510-thread-replies.sh
index 6837ff17..b7322198 100755
--- a/test/T510-thread-replies.sh
+++ b/test/T510-thread-replies.sh
@@ -164,5 +164,31 @@ expected='[[[{"id": "XXXXX", "match": true, "excluded": false,
expected=`echo "$expected" | notmuch_json_show_sanitize`
test_expect_equal_json "$output" "$expected"
+add_email_corpus threading
+
+test_begin_subtest "reply to ghost"
+test_subtest_known_broken
+notmuch show --entire-thread=true id:000-real-root at example.org | grep ^Subject: | head -1 > OUTPUT
+cat <<EOF > EXPECTED
+Subject: root message
+EOF
+test_expect_equal_file EXPECTED OUTPUT
+
+test_begin_subtest "reply to ghost (tree view)"
+test_subtest_known_broken
+test_emacs '(notmuch-tree "id:000-real-root at example.org")
+ (notmuch-test-wait)
+ (test-output)
+ (delete-other-windows)'
+cat <<EOF > EXPECTED
+ 2016-06-17 Alice â¬âºroot message (inbox unread)
+ 2016-06-18 Alice â°â¬âºchild message (inbox unread)
+ 2016-06-17 Mallory âââºfake root message (inbox unread)
+ 2016-06-18 Alice ââ¬âºgrand-child message (inbox unread)
+ 2016-06-18 Alice ââ°ââºgreat grand-child message (inbox unread)
+ 2016-06-18 Daniel â°ââºgrand-child message 2 (inbox unread)
+End of search results.
+EOF
+test_expect_equal_file EXPECTED OUTPUT
test_done
--
2.18.0
More information about the notmuch
mailing list