From: Austin Clements <amdragon@MIT.EDU>
To: notmuch@notmuchmail.org
Subject: [PATCH] test: Make generated message date a real date
Date: Wed, 28 Dec 2011 21:34:43 -0500 [thread overview]
Message-ID: <1325126083-13792-1-git-send-email-amdragon@mit.edu> (raw)
January 5, 2001 was a Tuesday, not a Friday. Jameson fixed this exact
problem for the multipart test in ec2b0a98cc, but not for
generate_message itself.
As Jameson pointed out in ec2b0a98cc, if we want to test date parsing,
we should do it separately.
---
test/emacs | 8 ++++----
test/encoding | 2 +-
test/maildir-sync | 4 ++--
test/raw | 4 ++--
test/test-lib.sh | 2 +-
5 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/test/emacs b/test/emacs
index ca82445..a06c223 100755
--- a/test/emacs
+++ b/test/emacs
@@ -81,7 +81,7 @@ cat <<EOF >EXPECTED
"Invalid " From" <test_suite@notmuchmail.org> (2001-01-05) (inbox)
Subject: message-with-invalid-from
To: Notmuch Test Suite <test_suite@notmuchmail.org>
-Date: Tue, 05 Jan 2001 15:43:57 -0000
+Date: Fri, 05 Jan 2001 15:43:57 +0000
This is just a test message (#1)
EOF
@@ -320,7 +320,7 @@ add_message '[from]="Top Poster <top@poster.com>"' \
----- Original Message -----
From: Notmuch Test Suite <test_suite@notmuchmail.org>
To: Notmuch Test Suite <test_suite@notmuchmai.org>
-Sent: Tue, 05 Jan 2001 15:43:57 -0000
+Sent: Fri, 05 Jan 2001 15:43:57 +0000
Subject: The problem with top-posting
Q: Why is top-posting such a bad thing?
@@ -331,7 +331,7 @@ test_emacs "(notmuch-show \"top-posting\")
echo "Notmuch Test Suite <test_suite@notmuchmail.org> (2001-01-05) (inbox)
Subject: The problem with top-posting
To: Notmuch Test Suite <test_suite@notmuchmail.org>
-Date: Tue, 05 Jan 2001 15:43:57 -0000
+Date: Fri, 05 Jan 2001 15:43:57 +0000
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
@@ -340,7 +340,7 @@ Q: What is the most annoying thing in e-mail?
Top Poster <top@poster.com> (2001-01-05) (inbox unread)
Subject: Re: The problem with top-posting
To: Notmuch Test Suite <test_suite@notmuchmail.org>
-Date: Tue, 05 Jan 2001 15:43:57 -0000
+Date: Fri, 05 Jan 2001 15:43:57 +0000
Thanks for the advice! I will be sure to put it to good use.
diff --git a/test/encoding b/test/encoding
index 673b039..e875c8b 100755
--- a/test/encoding
+++ b/test/encoding
@@ -12,7 +12,7 @@ Notmuch Test Suite <test_suite@notmuchmail.org> (2001-01-05) (inbox unread)
Subject: Test message #1
From: Notmuch Test Suite <test_suite@notmuchmail.org>
To: Notmuch Test Suite <test_suite@notmuchmail.org>
-Date: Tue, 05 Jan 2001 15:43:57 -0000
+Date: Fri, 05 Jan 2001 15:43:57 +0000
\fheader}
\fbody{
\fpart{ ID: 1, Content-type: text/plain
diff --git a/test/maildir-sync b/test/maildir-sync
index a60854f..d5872a5 100755
--- a/test/maildir-sync
+++ b/test/maildir-sync
@@ -55,8 +55,8 @@ test_expect_equal "$output" '[[[{"id": "adding-replied-tag@notmuch-test-suite",
"To": "Notmuch Test Suite <test_suite@notmuchmail.org>",
"Cc": "",
"Bcc": "",
-"Date": "Tue,
-05 Jan 2001 15:43:57 -0000"},
+"Date": "Fri,
+05 Jan 2001 15:43:57 +0000"},
"body": [{"id": 1,
"content-type": "text/plain",
"content": "This is just a test message (#3)\n"}]},
diff --git a/test/raw b/test/raw
index 99d3a3b..0171e64 100755
--- a/test/raw
+++ b/test/raw
@@ -19,7 +19,7 @@ test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.or
To: Notmuch Test Suite <test_suite@notmuchmail.org>
Message-Id: <msg-001@notmuch-test-suite>
Subject: Test message #1
-Date: Tue, 05 Jan 2001 15:43:57 -0000
+Date: Fri, 05 Jan 2001 15:43:57 +0000
This is just a test message (#1)"
@@ -29,7 +29,7 @@ test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.or
To: Notmuch Test Suite <test_suite@notmuchmail.org>
Message-Id: <msg-002@notmuch-test-suite>
Subject: Test message #2
-Date: Tue, 05 Jan 2001 15:43:57 -0000
+Date: Fri, 05 Jan 2001 15:43:57 +0000
This is just a test message (#2)"
diff --git a/test/test-lib.sh b/test/test-lib.sh
index 8edf256..862095c 100644
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -323,7 +323,7 @@ generate_message ()
fi
if [ -z "${template[date]}" ]; then
- template[date]="Tue, 05 Jan 2001 15:43:57 -0000"
+ template[date]="Fri, 05 Jan 2001 15:43:57 +0000"
fi
additional_headers=""
--
1.7.7.3
next reply other threads:[~2011-12-29 2:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-29 2:34 Austin Clements [this message]
2011-12-29 4:53 ` [PATCH] test: Make generated message date a real date Tomi Ollila
2011-12-29 8:59 ` Jameson Graef Rollins
2011-12-29 22:06 ` 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=1325126083-13792-1-git-send-email-amdragon@mit.edu \
--to=amdragon@mit.edu \
--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).