aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2018-04-25 17:36:32 -0300
committerDavid Bremner <david@tethera.net>2018-04-25 17:36:32 -0300
commit963ccabe93b0564e6979433f5be34395e9aa8ef1 (patch)
treefa762847a0e514fcb3d9c43025ec2cba799cc9a2 /test
parent20ba0b7dfae2111f76d71c8d695265014c2ef7c5 (diff)
parent15aaa41ce2b9667d86a81b3928a71f542ed448a1 (diff)
Merge branch 'release'
reference loop fixes to be included in 0.26.2
Diffstat (limited to 'test')
-rwxr-xr-xtest/T050-new.sh13
-rw-r--r--test/corpora/broken/loop/loop-128
-rw-r--r--test/corpora/broken/loop/loop-218
3 files changed, 29 insertions, 0 deletions
diff --git a/test/T050-new.sh b/test/T050-new.sh
index cd522364..9025fa7a 100755
--- a/test/T050-new.sh
+++ b/test/T050-new.sh
@@ -354,4 +354,17 @@ exit status: 75
EOF
test_expect_equal_file EXPECTED OUTPUT
+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"
+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
diff --git a/test/corpora/broken/loop/loop-12 b/test/corpora/broken/loop/loop-12
new file mode 100644
index 00000000..b5c3af7e
--- /dev/null
+++ b/test/corpora/broken/loop/loop-12
@@ -0,0 +1,8 @@
+From: Alice <alice@example.org>
+To: Daniel <daniel@example.org>
+Subject: referencing in-reply-to-loop-21
+Message-ID: <mid-loop-12@example.org>
+In-Reply-To: <mid-loop-21@example.org>
+Date: Thu, 16 Jun 2016 22:14:41 -0400
+
+Note Message-ID and In-Reply-To: in file in-reply-to-loop-21
diff --git a/test/corpora/broken/loop/loop-21 b/test/corpora/broken/loop/loop-21
new file mode 100644
index 00000000..234f0323
--- /dev/null
+++ b/test/corpora/broken/loop/loop-21
@@ -0,0 +1,8 @@
+From: Alice <alice@example.org>
+To: Daniel <daniel@example.org>
+Subject: referencing in-reply-to-loop-12
+Message-ID: <mid-loop-21@example.org>
+In-Reply-To: <mid-loop-12@example.org>
+Date: Fri, 17 Jun 2016 22:14:41 -0400
+
+Note Message-ID and In-Reply-To: in file in-reply-to-loop-12