]> git.notmuchmail.org Git - notmuch/commitdiff
test: add known broken test for thread ordering from a loop
authorDavid Bremner <david@tethera.net>
Sat, 14 Apr 2018 01:46:09 +0000 (22:46 -0300)
committerDavid Bremner <david@tethera.net>
Tue, 24 Apr 2018 02:00:20 +0000 (23:00 -0300)
The previous loop handling code chooses the last message in the
message list, which turns out to be the last in date order.
See the comment in _notmuch_thread_create.

test/T050-new.sh

index f3bfe7b159ab042d163dd1f22447948de4aafb14..320a76460c213a8a675f1888c61520b4a1ca02ec 100755 (executable)
@@ -358,4 +358,14 @@ add_email_corpus broken
 test_begin_subtest "reference loop does not crash"
 test_expect_code 0 "notmuch show --format=json id:mid-loop-12@example.org id:mid-loop-21@example.org > OUTPUT"
 
+test_begin_subtest "reference loop ordered by date"
+test_subtest_known_broken
+threadid=$(notmuch search --output=threads  id:mid-loop-12@example.org)
+notmuch show --format=mbox $threadid | grep '^Date'  > OUTPUT
+cat <<EOF > EXPECTED
+Date: Thu, 16 Jun 2016 22:14:41 -0400
+Date: Fri, 17 Jun 2016 22:14:41 -0400
+EOF
+test_expect_equal_file EXPECTED OUTPUT
+
 test_done