Class: TC_Unquoter

Inherits:
Test::Unit::TestCase
  • Object
show all
Defined in:
lib/tmail/quoting.rb

Instance Method Summary collapse

Instance Method Details

#test_unquote_base64Object



130
131
132
133
134
# File 'lib/tmail/quoting.rb', line 130

def test_unquote_base64
  a ="=?ISO-8859-1?B?WzE2NjQxN10gQmVrcuZmdGVsc2UgZnJhIFJlanNlZmViZXI=?="
  b = TMail::Unquoter.unquote_and_convert_to(a, 'utf-8')
  assert_equal "[166417] Bekr\303\246ftelse fra Rejsefeber", b
end

#test_unquote_quoted_printableObject



124
125
126
127
128
# File 'lib/tmail/quoting.rb', line 124

def test_unquote_quoted_printable
  a ="=?ISO-8859-1?Q?[166417]_Bekr=E6ftelse_fra_Rejsefeber?=" 
  b = TMail::Unquoter.unquote_and_convert_to(a, 'utf-8')
  assert_equal "[166417] Bekr\303\246ftelse fra Rejsefeber", b
end

#test_unquote_without_charsetObject



136
137
138
139
140
# File 'lib/tmail/quoting.rb', line 136

def test_unquote_without_charset
  a ="[166417]_Bekr=E6ftelse_fra_Rejsefeber" 
  b = TMail::Unquoter.unquote_and_convert_to(a, 'utf-8')
  assert_equal "[166417]_Bekr=E6ftelse_fra_Rejsefeber", b
end