From: David Bremner <david@tethera.net>
To: Johannes Schauer <j.schauer@email.de>, notmuch@notmuchmail.org
Subject: [PATCH 1/2] lib: add known broken test for parsing bad dates.
Date: Sun, 12 Mar 2017 09:51:00 -0300 [thread overview]
Message-ID: <20170312125101.21656-1-david@tethera.net> (raw)
In-Reply-To: <20150422065630.6330.90536@hoothoot>
This reproduces the symptoms of bug report
id:20150422065630.6330.90536@hoothoot
---
test/T660-bad-date.sh | 15 +++++++++++++++
1 file changed, 15 insertions(+)
create mode 100755 test/T660-bad-date.sh
diff --git a/test/T660-bad-date.sh b/test/T660-bad-date.sh
new file mode 100755
index 00000000..6463d5b8
--- /dev/null
+++ b/test/T660-bad-date.sh
@@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+test_description="parsing of bad dates"
+. ./test-lib.sh || exit 1
+
+add_message [date]='"()"'
+
+test_begin_subtest 'Bad dates translate to a date after the Unix epoch'
+test_subtest_known_broken
+cat <<EOF >EXPECTED
+thread:0000000000000001 1970-01-01 [1/1] Notmuch Test Suite; Test message #1 (inbox unread)
+EOF
+notmuch search '*' > OUTPUT
+test_expect_equal_file EXPECTED OUTPUT
+
+test_done
--
2.11.0
next prev parent reply other threads:[~2017-03-12 12:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-22 6:56 bug: notmuch cannot handle invalid Date fields Johannes Schauer
2015-04-22 13:37 ` Tomi Ollila
2015-04-22 13:42 ` Johannes Schauer
2017-03-12 1:38 ` David Bremner
2017-03-12 12:51 ` David Bremner [this message]
2017-03-12 12:51 ` [PATCH 2/2] lib: clamp return value of g_mime_utils_header_decode_date to >=0 David Bremner
2017-03-15 20:09 ` Tomi Ollila
2017-03-16 1:16 ` David Bremner
2017-03-19 12:31 ` bug: notmuch cannot handle invalid Date fields David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170312125101.21656-1-david@tethera.net \
--to=david@tethera.net \
--cc=j.schauer@email.de \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).