From c8a7a285dc83f05cbbd8b935fcf1d9c780f77ced Mon Sep 17 00:00:00 2001 From: lnu Date: Mon, 2 Jan 2006 20:08:52 +0000 Subject: 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 --- test/tc_parser.rb | 39 --------------------------------------- 1 file changed, 39 deletions(-) delete mode 100755 test/tc_parser.rb (limited to 'test/tc_parser.rb') 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 -- cgit v1.2.3-54-g00ecf