File: parse-test.rb

package info (click to toggle)
libtmail-ruby 0.10.8-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 856 kB
  • ctags: 1,461
  • sloc: ruby: 8,406; ansic: 678; objc: 584; yacc: 305; makefile: 149
file content (19 lines) | stat: -rw-r--r-- 330 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#
# parser test
#

require 'tmail'

puts "testing parser --------------------------------"
puts

TMail::Mail.load( 'data/normal' ).each_header do |key, field|
  if field.respond_to? :parse, true then
    field.instance_eval {
      parse
      @written = true
    }
  end
  printf "%s ok\n", field.name
  # puts field.decoded
end