mirror of
https://git.notmuchmail.org/git/notmuch
synced 2025-02-17 23:53:15 +01:00
test: Make generated message date a real date
January 5, 2001 was a Tuesday, not a Friday. Jameson fixed this exact problem for the multipart test inec2b0a98cc
, but not for generate_message itself. As Jameson pointed out inec2b0a98cc
, if we want to test date parsing, we should do it separately.
This commit is contained in:
parent
ac7f843064
commit
66ecd9063f
5 changed files with 10 additions and 10 deletions
|
@ -81,7 +81,7 @@ cat <<EOF >EXPECTED
|
||||||
"Invalid " From" <test_suite@notmuchmail.org> (2001-01-05) (inbox)
|
"Invalid " From" <test_suite@notmuchmail.org> (2001-01-05) (inbox)
|
||||||
Subject: message-with-invalid-from
|
Subject: message-with-invalid-from
|
||||||
To: 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
|
||||||
|
|
||||||
This is just a test message (#1)
|
This is just a test message (#1)
|
||||||
EOF
|
EOF
|
||||||
|
@ -320,7 +320,7 @@ add_message '[from]="Top Poster <top@poster.com>"' \
|
||||||
----- Original Message -----
|
----- Original Message -----
|
||||||
From: Notmuch Test Suite <test_suite@notmuchmail.org>
|
From: Notmuch Test Suite <test_suite@notmuchmail.org>
|
||||||
To: Notmuch Test Suite <test_suite@notmuchmai.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
|
Subject: The problem with top-posting
|
||||||
|
|
||||||
Q: Why is top-posting such a bad thing?
|
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)
|
echo "Notmuch Test Suite <test_suite@notmuchmail.org> (2001-01-05) (inbox)
|
||||||
Subject: The problem with top-posting
|
Subject: The problem with top-posting
|
||||||
To: 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
|
||||||
|
|
||||||
A: Because it messes up the order in which people normally read text.
|
A: Because it messes up the order in which people normally read text.
|
||||||
Q: Why is top-posting such a bad thing?
|
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)
|
Top Poster <top@poster.com> (2001-01-05) (inbox unread)
|
||||||
Subject: Re: The problem with top-posting
|
Subject: Re: The problem with top-posting
|
||||||
To: 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
|
||||||
|
|
||||||
Thanks for the advice! I will be sure to put it to good use.
|
Thanks for the advice! I will be sure to put it to good use.
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ Notmuch Test Suite <test_suite@notmuchmail.org> (2001-01-05) (inbox unread)
|
||||||
Subject: Test message #1
|
Subject: Test message #1
|
||||||
From: Notmuch Test Suite <test_suite@notmuchmail.org>
|
From: Notmuch Test Suite <test_suite@notmuchmail.org>
|
||||||
To: 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
|
||||||
header}
|
header}
|
||||||
body{
|
body{
|
||||||
part{ ID: 1, Content-type: text/plain
|
part{ ID: 1, Content-type: text/plain
|
||||||
|
|
|
@ -55,8 +55,8 @@ test_expect_equal "$output" '[[[{"id": "adding-replied-tag@notmuch-test-suite",
|
||||||
"To": "Notmuch Test Suite <test_suite@notmuchmail.org>",
|
"To": "Notmuch Test Suite <test_suite@notmuchmail.org>",
|
||||||
"Cc": "",
|
"Cc": "",
|
||||||
"Bcc": "",
|
"Bcc": "",
|
||||||
"Date": "Tue,
|
"Date": "Fri,
|
||||||
05 Jan 2001 15:43:57 -0000"},
|
05 Jan 2001 15:43:57 +0000"},
|
||||||
"body": [{"id": 1,
|
"body": [{"id": 1,
|
||||||
"content-type": "text/plain",
|
"content-type": "text/plain",
|
||||||
"content": "This is just a test message (#3)\n"}]},
|
"content": "This is just a test message (#3)\n"}]},
|
||||||
|
|
4
test/raw
4
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>
|
To: Notmuch Test Suite <test_suite@notmuchmail.org>
|
||||||
Message-Id: <msg-001@notmuch-test-suite>
|
Message-Id: <msg-001@notmuch-test-suite>
|
||||||
Subject: Test message #1
|
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)"
|
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>
|
To: Notmuch Test Suite <test_suite@notmuchmail.org>
|
||||||
Message-Id: <msg-002@notmuch-test-suite>
|
Message-Id: <msg-002@notmuch-test-suite>
|
||||||
Subject: Test message #2
|
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)"
|
This is just a test message (#2)"
|
||||||
|
|
||||||
|
|
|
@ -323,7 +323,7 @@ generate_message ()
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${template[date]}" ]; then
|
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
|
fi
|
||||||
|
|
||||||
additional_headers=""
|
additional_headers=""
|
||||||
|
|
Loading…
Add table
Reference in a new issue