summaryrefslogtreecommitdiff
path: root/test/tc_parser.rb
diff options
context:
space:
mode:
authorlnu <lnu@f70e237a-67f3-0310-a06c-d2b8a7116972>2006-01-02 20:08:52 +0000
committerlnu <lnu@f70e237a-67f3-0310-a06c-d2b8a7116972>2006-01-02 20:08:52 +0000
commitc8a7a285dc83f05cbbd8b935fcf1d9c780f77ced (patch)
tree0f2f6a59c2985aaf72173f5e947ef4caa739ff5b /test/tc_parser.rb
parentcab3234d550ce0d76c53a22be3376571654b4e09 (diff)
downloadfeed2imap-c8a7a285dc83f05cbbd8b935fcf1d9c780f77ced.tar.gz
feed2imap-c8a7a285dc83f05cbbd8b935fcf1d9c780f77ced.tar.bz2
feed2imap-c8a7a285dc83f05cbbd8b935fcf1d9c780f77ced.zip
Now uses ruby-feedparser for feed parsing
git-svn-id: svn+ssh://svn.gna.org/svn/feed2imap/trunk/feed2imap@73 f70e237a-67f3-0310-a06c-d2b8a7116972
Diffstat (limited to '')
-rwxr-xr-xtest/tc_parser.rb39
1 files changed, 0 insertions, 39 deletions
diff --git a/test/tc_parser.rb b/test/tc_parser.rb
deleted file mode 100755
index 6dbf27e..0000000
--- a/test/tc_parser.rb
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/usr/bin/ruby -w
-
-$:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
-
-require 'test/unit'
-require 'feed2imap/channel'
-
-class ParserTest < Test::Unit::TestCase
- DATADIR = 'test/parserdata'
- def test_parser
- return if not File::exist?(DATADIR)
- allok = true
- Dir.foreach(DATADIR) do |f|
- next if f !~ /.xml$/
-# puts "Checking #{f}"
- str = File::read(DATADIR + '/' + f)
- chan = Channel::new(str)
- # for easier reading, go to ISO
- chanstr = chan.to_s
- chanstr = chanstr.unpack('U*').pack('C*')
- if File::exist?(DATADIR + '/' + f.gsub(/.xml$/, '.output'))
- output = File::read(DATADIR + '/' + f.gsub(/.xml$/, '.output'))
- File::open(DATADIR + '/' + f.gsub(/.xml$/, '.output.new'), "w") do |fd|
- fd.print(chanstr)
- end
- if output != chanstr
- puts "Test failed for #{f}. Try diff -u #{DATADIR + '/' + f.gsub(/.xml$/, '.output')}{,.new}"
- allok = false
- end
- else
- puts "Missing #{DATADIR + '/' + f.gsub(/.xml$/, '.output')}."
- File::open(DATADIR + '/' + f.gsub(/.xml$/, '.output.new'), "w") do |f|
- f.print(chanstr)
- end
- end
- end
- assert(allok)
- end
-end