Patch #17718 » 0002-Add-test-for-trailing-unicode-whitespace-after-email.patch
| test/fixtures/mail_handler/ticket_on_given_project.eml | ||
|---|---|---|
|
MIME-Version: 1.0
|
||
|
Content-Type: text/plain;
|
||
|
format=flowed;
|
||
|
charset="iso-8859-1";
|
||
|
charset="utf-8";
|
||
|
reply-type=original
|
||
|
Content-Transfer-Encoding: 7bit
|
||
|
Content-Transfer-Encoding: quoted-printable
|
||
|
X-Priority: 3
|
||
|
X-MSMail-Priority: Normal
|
||
|
X-Mailer: Microsoft Outlook Express 6.00.2900.2869
|
||
| ... | ... | |
|
This paragraph is between delimiters.
|
||
|
---
|
||
|
---=C2=A0
|
||
|
This paragraph is after the delimiter so it shouldn't appear.
|
||
| test/unit/mail_handler_test.rb | ||
|---|---|---|
|
assert_issue_created(issue)
|
||
|
assert issue.description.include?('This paragraph is before delimiters')
|
||
|
assert issue.description.include?('--- This line starts with a delimiter')
|
||
|
assert !issue.description.match(/^---$/)
|
||
|
assert !issue.description.match(/^---#{"\u00A0"}$/)
|
||
|
assert !issue.description.include?('This paragraph is after the delimiter')
|
||
|
end
|
||
|
end
|
||