0002-Add-test-for-trailing-unicode-whitespace-after-email.patch

Holger Just, 2014-08-20 18:21

Download (1.82 KB)

View differences:

test/fixtures/mail_handler/ticket_on_given_project.eml
10 10
MIME-Version: 1.0
11 11
Content-Type: text/plain;
12 12
	format=flowed;
13
	charset="iso-8859-1";
13
	charset="utf-8";
14 14
	reply-type=original
15
Content-Transfer-Encoding: 7bit
15
Content-Transfer-Encoding: quoted-printable
16 16
X-Priority: 3
17 17
X-MSMail-Priority: Normal
18 18
X-Mailer: Microsoft Outlook Express 6.00.2900.2869
......
38 38

  
39 39
This paragraph is between delimiters.
40 40

  
41
---
41
---=C2=A0
42 42

  
43 43
This paragraph is after the delimiter so it shouldn't appear.
44 44

  
test/unit/mail_handler_test.rb
795 795
      assert_issue_created(issue)
796 796
      assert issue.description.include?('This paragraph is before delimiters')
797 797
      assert issue.description.include?('--- This line starts with a delimiter')
798
      assert !issue.description.match(/^---$/)
798
      assert !issue.description.match(/^---#{"\u00A0"}$/)
799 799
      assert !issue.description.include?('This paragraph is after the delimiter')
800 800
    end
801 801
  end
802
-