diff options
author | Jamis Buck <jamis@37signals.com> | 2006-09-09 21:14:43 +0000 |
---|---|---|
committer | Jamis Buck <jamis@37signals.com> | 2006-09-09 21:14:43 +0000 |
commit | 4d9ca4d9fbed86936b6a2cee792ea8509eef81b2 (patch) | |
tree | 261410c00df8de487b3fa3916a8f93720ad85df0 /actionmailer/test/quoting_test.rb | |
parent | 3e7aa0391fb0da5ea6c38ceb682c8634d3a1cb72 (diff) | |
download | rails-4d9ca4d9fbed86936b6a2cee792ea8509eef81b2.tar.gz rails-4d9ca4d9fbed86936b6a2cee792ea8509eef81b2.tar.bz2 rails-4d9ca4d9fbed86936b6a2cee792ea8509eef81b2.zip |
Make sure quoted-printable text is decoded correctly when only portions of the text are encoded. closes #3154.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5080 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionmailer/test/quoting_test.rb')
-rw-r--r-- | actionmailer/test/quoting_test.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/actionmailer/test/quoting_test.rb b/actionmailer/test/quoting_test.rb index 41d4ab680b..77bd769be9 100644 --- a/actionmailer/test/quoting_test.rb +++ b/actionmailer/test/quoting_test.rb @@ -26,6 +26,11 @@ class QuotingTest < Test::Unit::TestCase assert_match %r{Elapsed time}, mail.body end + def test_email_with_partially_quoted_subject + mail = TMail::Mail.parse(IO.read("#{File.dirname(__FILE__)}/fixtures/raw_email_with_partially_quoted_subject")) + assert_equal "Re: Test: \"\346\274\242\345\255\227\" mid \"\346\274\242\345\255\227\" tail", mail.subject + end + private # This whole thing *could* be much simpler, but I don't think Tempfile, @@ -44,7 +49,7 @@ class QuotingTest < Test::Unit::TestCase end system("ruby #{test_name} > #{res_name}") or raise "could not run test in sandbox" - File.read(res_name) + File.read(res_name).chomp ensure File.delete(test_name) rescue nil File.delete(res_name) rescue nil |