test: add a test suite and simple testing script.
authorW. Trevor King <wking@tremily.us>
Fri, 5 Oct 2012 11:13:54 +0000 (07:13 -0400)
committerW. Trevor King <wking@tremily.us>
Fri, 5 Oct 2012 11:13:59 +0000 (07:13 -0400)
It would probably be a good idea to use the unittest framework, but
this works as a first pass.

test/README [new file with mode: 0644]
test/allthingsrss/1.config [new file with mode: 0644]
test/allthingsrss/1.expected [new file with mode: 0644]
test/allthingsrss/README [new file with mode: 0644]
test/allthingsrss/feed.atom [new file with mode: 0644]
test/test.py [new file with mode: 0755]

diff --git a/test/README b/test/README
new file mode 100644 (file)
index 0000000..de7d8ba
--- /dev/null
@@ -0,0 +1,45 @@
+Run tests with::
+
+  $ PYTHONPATH=. ./test/test.py
+
+Which looks for any ``*/feed.*`` files and processes them using each
+``*.config`` file in the feed's directory.  The output messages are
+saved (not mailed) and compared with the expected output for that
+feed/config pair.  For example, with a directory structure like::
+
+  test
+  |-- README
+  |-- allthingsrss
+  |   |-- 1.config
+  |   |-- 1.expected
+  |   |-- 2.config
+  |   |-- 2.expected
+  |   `-- feed.atom
+  |-- otherfeed
+  |   |-- a.config
+  |   |-- a.expected
+  |   |-- b.config
+  |   |-- b.expected
+  |   `-- feed.rss
+  `-- test.py
+
+``test.py`` will parse:
+
+* ``feed.atom`` after loading ``1.config`` and compare the output with
+  ``1.expected``.
+* ``feed.atom`` after loading ``2.config`` and compare the output with
+  ``2.expected``.
+* ``feed.rss`` after loading ``a.config`` and compare the output with
+  ``a.expected``.
+* ``feed.rss`` after loading ``b.config`` and compare the output with
+  ``b.expected``.
+
+If you only want to limit yourself to a subset of tests, you can
+specify subdirectories on the command line::
+
+  $ PYTHONPATH=. ./test/test.py test/allthingsrss
+
+You can limit the tests even further by specify particular config
+files::
+
+  $ PYTHONPATH=. ./test/test.py test/allthingsrss/1.config
diff --git a/test/allthingsrss/1.config b/test/allthingsrss/1.config
new file mode 100644 (file)
index 0000000..15935c4
--- /dev/null
@@ -0,0 +1,3 @@
+[DEFAULT]
+to = a@b.com
+date-header = True
diff --git a/test/allthingsrss/1.expected b/test/allthingsrss/1.expected
new file mode 100644 (file)
index 0000000..5bd9bb4
--- /dev/null
@@ -0,0 +1,398 @@
+SENT TO: "rss2email: Lindsey Smith" <bozo@dev.null.invalid>
+MIME-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Content-Transfer-Encoding: 7bit
+From: "rss2email: Lindsey Smith" <bozo@dev.null.invalid>
+To: a@b.com
+Subject: Version 2.67 Released
+Date: Tue, 21 Sep 2010 16:55:07 -0000
+User-Agent: rss2email
+X-RSS-Feed: allthingsrss/feed.atom
+X-RSS-ID: http://www.allthingsrss.com/rss2email/?p=62
+X-RSS-URL: http://feedproxy.google.com/~r/allthingsrss/hJBr/~3/aGbf5Gefkmc/
+X-RSS-TAGS: Uncategorized
+
+Version 2.67 of rss2email is now available for both
+[Linux](http://www.allthingsrss.com/rss2email/rss2email-2.67.tar.gz) and
+[Windows](http://www.allthingsrss.com/rss2email/rss2email-2.67.zip), which
+includes the latest development version of feedparser. Changes from the
+previous version:
+
+  * Fixed entries that include an id which is blank (i.e., an empty string) were being resent
+  * Fixed some entries not being sent by email because they had bad From headers
+  * Fixed From headers with HTML entities encoded twice
+  * Compatibility changes to support most recent development versions of feedparser
+  * Compatibility changes to support Google Reader feeds
+
+Complete list in the official
+[CHANGELOG](http://www.allthingsrss.com/rss2email/changelog).
+
+[![](http://feedads.g.doubleclick.net/~a/Sjq8v-
+Lq2dNKzkelsypiC4fjPLM/0/di)](http://feedads.g.doubleclick.net/~a/Sjq8v-
+Lq2dNKzkelsypiC4fjPLM/0/da)
+
+[![](http://feedads.g.doubleclick.net/~a/Sjq8v-
+Lq2dNKzkelsypiC4fjPLM/1/di)](http://feedads.g.doubleclick.net/~a/Sjq8v-
+Lq2dNKzkelsypiC4fjPLM/1/da)
+
+![](http://feeds.feedburner.com/~r/allthingsrss/hJBr/~4/aGbf5Gefkmc)
+
+
+
+URL: http://feedproxy.google.com/~r/allthingsrss/hJBr/~3/aGbf5Gefkmc/
+
+SENT TO: "rss2email: Lindsey Smith" <bozo@dev.null.invalid>
+MIME-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Content-Transfer-Encoding: 7bit
+From: "rss2email: Lindsey Smith" <bozo@dev.null.invalid>
+To: a@b.com
+Subject: Version 2.68 Released with Actual New Features
+Date: Fri, 01 Oct 2010 18:21:26 -0000
+User-Agent: rss2email
+X-RSS-Feed: allthingsrss/feed.atom
+X-RSS-ID: http://www.allthingsrss.com/rss2email/?p=72
+X-RSS-URL: http://feedproxy.google.com/~r/allthingsrss/hJBr/~3/bT-I0iH2vw8/
+X-RSS-TAGS: Uncategorized
+
+Unlike the last few versions of rss2email that have trickled out, I finally
+got around to adding a few new oft-requested features! Version 2.68 of
+rss2email is now available for both
+[Linux](http://www.allthingsrss.com/rss2email/rss2email-2.68.tar.gz) and
+[Windows](http://www.allthingsrss.com/rss2email/rss2email-2.68.zip).
+
+Changes from the previous version:
+
+  * Added ability to pause/resume checking of individual feeds through pause and unpause commands
+  * Added ability to import and export OPML feed lists through importopml and exportopml commands
+
+Complete list in the official
+[CHANGELOG](http://www.allthingsrss.com/rss2email/changelog).
+
+**Pause/Unpause**
+
+Through `r2e pause _n_` where _n_ is a feed number, you can temporarily
+suspend checking that feed for new content. To start checking it again, simply
+run `r2e unpause _n_`. When you `r2e list`, an asterisk indicates that the
+feed is currently unpaused and active.
+
+**OMPL Import/Export**
+
+[OPML](http://en.wikipedia.org/wiki/OPML) is an XML format commonly used to
+exchange a list of RSS feeds between applications. `r2e opmlexport >
+_filename_` will give you a file that you can use to import your list of feeds
+into another application. If you've exported feeds from another application
+into a file, `r2e opmlimport _filename_` will add those feeds to your
+rss2email feed list.
+
+[![](http://feedads.g.doubleclick.net/~a/nYgTsIUsS9pmvRZ6092XGGHnNKg/0/di)](ht
+tp://feedads.g.doubleclick.net/~a/nYgTsIUsS9pmvRZ6092XGGHnNKg/0/da)
+
+[![](http://feedads.g.doubleclick.net/~a/nYgTsIUsS9pmvRZ6092XGGHnNKg/1/di)](ht
+tp://feedads.g.doubleclick.net/~a/nYgTsIUsS9pmvRZ6092XGGHnNKg/1/da)
+
+![](http://feeds.feedburner.com/~r/allthingsrss/hJBr/~4/bT-I0iH2vw8)
+
+
+
+URL: http://feedproxy.google.com/~r/allthingsrss/hJBr/~3/bT-I0iH2vw8/
+
+SENT TO: "rss2email: Lindsey Smith" <bozo@dev.null.invalid>
+MIME-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Content-Transfer-Encoding: 7bit
+From: "rss2email: Lindsey Smith" <bozo@dev.null.invalid>
+To: a@b.com
+Subject: How to Read RSS Feeds in Emacs
+Date: Fri, 05 Nov 2010 17:36:14 -0000
+User-Agent: rss2email
+X-RSS-Feed: allthingsrss/feed.atom
+X-RSS-ID: http://www.allthingsrss.com/rss2email/?p=79
+X-RSS-URL: http://feedproxy.google.com/~r/allthingsrss/hJBr/~3/JryfOLe_q6c/
+X-RSS-TAGS: Uncategorized
+
+Emacs and rss2email user Erik Hetzner has written up a tutorial on how he
+integrated [RSS feed reading into
+Emacs](http://www.emacswiki.org/emacs/HOWTOReadFeedsInEmacsViaEmail) using
+rss2email.
+
+[![](http://feedads.g.doubleclick.net/~a/W185EjeIKKNPfRCWp9sV0gDrfJk/0/di)](ht
+tp://feedads.g.doubleclick.net/~a/W185EjeIKKNPfRCWp9sV0gDrfJk/0/da)
+
+[![](http://feedads.g.doubleclick.net/~a/W185EjeIKKNPfRCWp9sV0gDrfJk/1/di)](ht
+tp://feedads.g.doubleclick.net/~a/W185EjeIKKNPfRCWp9sV0gDrfJk/1/da)
+
+![](http://feeds.feedburner.com/~r/allthingsrss/hJBr/~4/JryfOLe_q6c)
+
+
+
+URL: http://feedproxy.google.com/~r/allthingsrss/hJBr/~3/JryfOLe_q6c/
+
+SENT TO: "rss2email: Lindsey Smith" <bozo@dev.null.invalid>
+MIME-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Content-Transfer-Encoding: 7bit
+From: "rss2email: Lindsey Smith" <bozo@dev.null.invalid>
+To: a@b.com
+Subject: Version 2.69 Released
+Date: Fri, 12 Nov 2010 18:45:08 -0000
+User-Agent: rss2email
+X-RSS-Feed: allthingsrss/feed.atom
+X-RSS-ID: http://www.allthingsrss.com/rss2email/?p=85
+X-RSS-URL: http://feedproxy.google.com/~r/allthingsrss/hJBr/~3/ubaE55Le1OU/
+X-RSS-TAGS: Uncategorized
+
+Version 2.69 of rss2email is now available for both
+[Linux](http://www.allthingsrss.com/rss2email/rss2email-2.69.tar.gz) and
+[Windows](http://www.allthingsrss.com/rss2email/rss2email-2.69.zip).
+
+Changes from the previous version:
+
+  * Added support for connecting to SMTP server via SSL, see SMTP_SSL option 
+  * Improved backwards compatibility by fixing issue with listing feeds when run with older Python versions 
+  * Added selective feed email overrides through OVERRIDE_EMAIL and DEFAULT_EMAIL options 
+  * Added NO_FRIENDLY_NAME to from from address only without the friendly name 
+  * Added X-RSS-URL header in each message with the link to the original item 
+
+Complete list in the official
+[CHANGELOG](http://www.allthingsrss.com/rss2email/changelog).
+
+[![](http://feedads.g.doubleclick.net/~a/ygS5IVjPi9xnNjTZA1SFTAzPtuA/0/di)](ht
+tp://feedads.g.doubleclick.net/~a/ygS5IVjPi9xnNjTZA1SFTAzPtuA/0/da)
+
+[![](http://feedads.g.doubleclick.net/~a/ygS5IVjPi9xnNjTZA1SFTAzPtuA/1/di)](ht
+tp://feedads.g.doubleclick.net/~a/ygS5IVjPi9xnNjTZA1SFTAzPtuA/1/da)
+
+![](http://feeds.feedburner.com/~r/allthingsrss/hJBr/~4/ubaE55Le1OU)
+
+
+
+URL: http://feedproxy.google.com/~r/allthingsrss/hJBr/~3/ubaE55Le1OU/
+
+SENT TO: "rss2email: Lindsey Smith" <bozo@dev.null.invalid>
+MIME-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Content-Transfer-Encoding: 7bit
+From: "rss2email: Lindsey Smith" <bozo@dev.null.invalid>
+To: a@b.com
+Subject: Minor Correction to v2.69 Packages
+Date: Fri, 10 Dec 2010 17:47:58 -0000
+User-Agent: rss2email
+X-RSS-Feed: allthingsrss/feed.atom
+X-RSS-ID: http://www.allthingsrss.com/rss2email/?p=88
+X-RSS-URL: http://feedproxy.google.com/~r/allthingsrss/hJBr/~3/CiODBX5_NSk/
+X-RSS-TAGS: Uncategorized
+
+The v2.69 rss2email packages contain an example config.py file that might
+accidentally overwrite an existing config.py file. To keep this from happening
+I've updated both the
+[Linux](http://www.allthingsrss.com/rss2email/rss2email-2.69.tar.gz) and
+[Windows](http://www.allthingsrss.com/rss2email/rss2email-2.69.zip) by simply
+renaming the file to config.py.example.
+
+[![](http://feedads.g.doubleclick.net/~a/V9Hd_J59X3SfWg3Q2XbjLNcdusA/0/di)](ht
+tp://feedads.g.doubleclick.net/~a/V9Hd_J59X3SfWg3Q2XbjLNcdusA/0/da)
+
+[![](http://feedads.g.doubleclick.net/~a/V9Hd_J59X3SfWg3Q2XbjLNcdusA/1/di)](ht
+tp://feedads.g.doubleclick.net/~a/V9Hd_J59X3SfWg3Q2XbjLNcdusA/1/da)
+
+![](http://feeds.feedburner.com/~r/allthingsrss/hJBr/~4/CiODBX5_NSk)
+
+
+
+URL: http://feedproxy.google.com/~r/allthingsrss/hJBr/~3/CiODBX5_NSk/
+
+SENT TO: "rss2email: Lindsey Smith" <bozo@dev.null.invalid>
+MIME-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Content-Transfer-Encoding: 7bit
+From: "rss2email: Lindsey Smith" <bozo@dev.null.invalid>
+To: a@b.com
+Subject: Minor correction to the minor correction: v2.69a released
+Date: Mon, 13 Dec 2010 18:04:20 -0000
+User-Agent: rss2email
+X-RSS-Feed: allthingsrss/feed.atom
+X-RSS-ID: http://www.allthingsrss.com/rss2email/?p=95
+X-RSS-URL: http://feedproxy.google.com/~r/allthingsrss/hJBr/~3/VgWvylH6fvk/
+X-RSS-TAGS: Uncategorized
+
+Last week I made a [slight change to the v2.69 rss2email
+packages](http://www.allthingsrss.com/rss2email/2010/12/minor-correction-
+to-v2-69-packages/), which can cause suspicion that they have been tampered
+with. To mitigate this, I put the original v2.69 files back in place and
+renamed the updated package set to v2.69a.
+
+Here is v2.69a:
+[Linux](http://www.allthingsrss.com/rss2email/rss2email-2.69a.tar.gz) and
+[Windows](http://www.allthingsrss.com/rss2email/rss2email-2.69a.zip)
+
+And here is the original v2.69:
+[Linux](http://www.allthingsrss.com/rss2email/rss2email-2.69.tar.gz) and
+[Windows](http://www.allthingsrss.com/rss2email/rss2email-2.69.zip)
+
+[![](http://feedads.g.doubleclick.net/~a/a817YdrxPE_g34wXU-
+SAzQ6UihM/0/di)](http://feedads.g.doubleclick.net/~a/a817YdrxPE_g34wXU-
+SAzQ6UihM/0/da)
+
+[![](http://feedads.g.doubleclick.net/~a/a817YdrxPE_g34wXU-
+SAzQ6UihM/1/di)](http://feedads.g.doubleclick.net/~a/a817YdrxPE_g34wXU-
+SAzQ6UihM/1/da)
+
+![](http://feeds.feedburner.com/~r/allthingsrss/hJBr/~4/VgWvylH6fvk)
+
+
+
+URL: http://feedproxy.google.com/~r/allthingsrss/hJBr/~3/VgWvylH6fvk/
+
+SENT TO: "rss2email: Lindsey Smith" <bozo@dev.null.invalid>
+MIME-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Content-Transfer-Encoding: 7bit
+From: "rss2email: Lindsey Smith" <bozo@dev.null.invalid>
+To: a@b.com
+Subject: Mac OS X and rss2email are Compatible
+Date: Fri, 17 Dec 2010 20:54:27 -0000
+User-Agent: rss2email
+X-RSS-Feed: allthingsrss/feed.atom
+X-RSS-ID: http://www.allthingsrss.com/rss2email/?p=99
+X-RSS-URL: http://feedproxy.google.com/~r/allthingsrss/hJBr/~3/cILvxh4ziQg/
+X-RSS-TAGS: Uncategorized
+
+rss2email user Jon Thompson has reported that Linux rss2email works well under
+Mac OS X. This is good news, but not to surprising since Apple based OS X on
+UNIX.
+
+Technically the rss2email Linux package usually works on other UNIX-derived
+OSs, such as CentOS and BSD. They aren't officially supported, but we usually
+try resolve incompatibilities if possible.
+
+[![](http://feedads.g.doubleclick.net/~a/n8I-
+3iyxNsT7ki6avOy7J2DFJk8/0/di)](http://feedads.g.doubleclick.net/~a/n8I-
+3iyxNsT7ki6avOy7J2DFJk8/0/da)
+
+[![](http://feedads.g.doubleclick.net/~a/n8I-
+3iyxNsT7ki6avOy7J2DFJk8/1/di)](http://feedads.g.doubleclick.net/~a/n8I-
+3iyxNsT7ki6avOy7J2DFJk8/1/da)
+
+![](http://feeds.feedburner.com/~r/allthingsrss/hJBr/~4/cILvxh4ziQg)
+
+
+
+URL: http://feedproxy.google.com/~r/allthingsrss/hJBr/~3/cILvxh4ziQg/
+
+SENT TO: "rss2email: Lindsey Smith" <bozo@dev.null.invalid>
+MIME-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Content-Transfer-Encoding: 7bit
+From: "rss2email: Lindsey Smith" <bozo@dev.null.invalid>
+To: a@b.com
+Subject: Version 2.70 Released
+Date: Tue, 21 Dec 2010 20:00:49 -0000
+User-Agent: rss2email
+X-RSS-Feed: allthingsrss/feed.atom
+X-RSS-ID: http://www.allthingsrss.com/rss2email/?p=106
+X-RSS-URL: http://feedproxy.google.com/~r/allthingsrss/hJBr/~3/0rUaRcCJ8dU/
+X-RSS-TAGS: Uncategorized
+
+Version 2.70 of rss2email is now available for both
+[Linux](http://www.allthingsrss.com/rss2email/rss2email-2.70.tar.gz) and
+[Windows](http://www.allthingsrss.com/rss2email/rss2email-2.70.zip).
+
+Changes from the previous version:
+
+  * Improved handling of given feed email addresses to prevent mail servers rejecting poorly formed Froms 
+  * Added X-RSS-TAGS header that lists any tags provided by an entry, which will be helpful in filtering incoming messages 
+
+Complete list in the official
+[CHANGELOG](http://www.allthingsrss.com/rss2email/changelog).
+
+[![](http://feedads.g.doubleclick.net/~a/3-mTadqlwiwGd3BGVmqYMI2xAyg/0/di)](ht
+tp://feedads.g.doubleclick.net/~a/3-mTadqlwiwGd3BGVmqYMI2xAyg/0/da)
+
+[![](http://feedads.g.doubleclick.net/~a/3-mTadqlwiwGd3BGVmqYMI2xAyg/1/di)](ht
+tp://feedads.g.doubleclick.net/~a/3-mTadqlwiwGd3BGVmqYMI2xAyg/1/da)
+
+![](http://feeds.feedburner.com/~r/allthingsrss/hJBr/~4/0rUaRcCJ8dU)
+
+
+
+URL: http://feedproxy.google.com/~r/allthingsrss/hJBr/~3/0rUaRcCJ8dU/
+
+SENT TO: "rss2email: Lindsey Smith" <bozo@dev.null.invalid>
+MIME-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Content-Transfer-Encoding: 7bit
+From: "rss2email: Lindsey Smith" <bozo@dev.null.invalid>
+To: a@b.com
+Subject: Version 2.71 Release plus Other Major Updates
+Date: Fri, 04 Mar 2011 18:03:11 -0000
+User-Agent: rss2email
+X-RSS-Feed: allthingsrss/feed.atom
+X-RSS-ID: http://www.allthingsrss.com/rss2email/?p=123
+X-RSS-URL: http://feedproxy.google.com/~r/allthingsrss/hJBr/~3/wsLSVDNzno0/
+X-RSS-TAGS: Uncategorized
+
+Good news everyone! Two important tools that rss2email depends on have
+recently received major upgrades:
+[feedparser](http://code.google.com/p/feedparser/) and
+[html2text](https://github.com/aaronsw/html2text). These should improve
+rss2email's ability to handle feeds with poorly formed HTML and other
+weirdness.
+
+The rss2email application itself also needed to be upgraded some to support
+these. Changes in this version:
+
+  * Upgraded to feedparser v5.01! (http://code.google.com/p/feedparser/) 
+  * Upgraded to html2text v3.01! (https://github.com/aaronsw/html2text) 
+  * Potentially safer method for writing feeds.dat on UNIX 
+  * Handle via links with no title attribute 
+  * Handle attributes more cleanly with OVERRIDE_EMAIL and DEFAULT_EMAIL 
+
+[![](http://feedads.g.doubleclick.net/~a/mPc_o2aCgPYkdQhi-
+IMAOP4LbS0/0/di)](http://feedads.g.doubleclick.net/~a/mPc_o2aCgPYkdQhi-
+IMAOP4LbS0/0/da)
+
+[![](http://feedads.g.doubleclick.net/~a/mPc_o2aCgPYkdQhi-
+IMAOP4LbS0/1/di)](http://feedads.g.doubleclick.net/~a/mPc_o2aCgPYkdQhi-
+IMAOP4LbS0/1/da)
+
+![](http://feeds.feedburner.com/~r/allthingsrss/hJBr/~4/wsLSVDNzno0)
+
+
+
+URL: http://feedproxy.google.com/~r/allthingsrss/hJBr/~3/wsLSVDNzno0/
+
+SENT TO: "rss2email: Lindsey Smith" <bozo@dev.null.invalid>
+MIME-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Content-Transfer-Encoding: 7bit
+From: "rss2email: Lindsey Smith" <bozo@dev.null.invalid>
+To: a@b.com
+Subject: Mac OS, rss2email and scheduling with launchd
+Date: Tue, 23 Aug 2011 15:57:37 -0000
+User-Agent: rss2email
+X-RSS-Feed: allthingsrss/feed.atom
+X-RSS-ID: http://www.allthingsrss.com/rss2email/?p=131
+X-RSS-URL: http://feedproxy.google.com/~r/allthingsrss/hJBr/~3/0hb7cT3sLUM/
+X-RSS-TAGS: Uncategorized
+
+Just a little FYI if you encounter this: MacRumors user durlecs was having a
+[problem scheduling rss2email with
+launchd](http://forums.macrumors.com/showthread.php?t=1216694), Mac OS's built
+in replacement for cron and other UNIX services. It looks like he/she got it
+working in the end by adding the path to Python into the PATH environment
+variable.
+
+[![](http://feedads.g.doubleclick.net/~a/0Q4e9-dkgHhcjqmhUxC-
+_qJrGKA/0/di)](http://feedads.g.doubleclick.net/~a/0Q4e9-dkgHhcjqmhUxC-
+_qJrGKA/0/da)
+
+[![](http://feedads.g.doubleclick.net/~a/0Q4e9-dkgHhcjqmhUxC-
+_qJrGKA/1/di)](http://feedads.g.doubleclick.net/~a/0Q4e9-dkgHhcjqmhUxC-
+_qJrGKA/1/da)
+
+![](http://feeds.feedburner.com/~r/allthingsrss/hJBr/~4/0hb7cT3sLUM)
+
+
+
+URL: http://feedproxy.google.com/~r/allthingsrss/hJBr/~3/0hb7cT3sLUM/
diff --git a/test/allthingsrss/README b/test/allthingsrss/README
new file mode 100644 (file)
index 0000000..c24417a
--- /dev/null
@@ -0,0 +1,19 @@
+feed.atom is a snapshot of
+
+  http://feeds.feedburner.com/allthingsrss/hJBr
+
+as of 2012-10-04.
+
+HTTP headers:
+
+  HTTP/1.1 200 OK
+  Content-Type: text/xml; charset=UTF-8
+  ETag: Qki3L47sjALSTTcA3nJpJua1le8
+  Last-Modified: Thu, 04 Oct 2012 22:06:19 GMT
+  Date: Thu, 04 Oct 2012 23:20:33 GMT
+  Expires: Thu, 04 Oct 2012 23:20:33 GMT
+  Cache-Control: private, max-age=0
+  X-Content-Type-Options: nosniff
+  X-XSS-Protection: 1; mode=block
+  Server: GSE
+  Transfer-Encoding: chunked
diff --git a/test/allthingsrss/feed.atom b/test/allthingsrss/feed.atom
new file mode 100644 (file)
index 0000000..248fc68
--- /dev/null
@@ -0,0 +1,248 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" xml:lang="en" xml:base="http://www.allthingsrss.com/rss2email/wp-atom.php">\r
+       <title type="text">rss2email</title>\r
+       <subtitle type="text">a free, open-source tool for Windows and UNIX for getting news from RSS feeds in email</subtitle>\r
+\r
+       <updated>2011-08-23T15:57:37Z</updated>\r
+\r
+       <link rel="alternate" type="text/html" href="http://www.allthingsrss.com/rss2email" />\r
+       <id>http://www.allthingsrss.com/rss2email/feed/atom/</id>\r
+       \r
+\r
+       <generator uri="http://wordpress.org/" version="3.3.1">WordPress</generator>\r
+               <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/allthingsrss/hJBr" /><feedburner:info uri="allthingsrss/hjbr" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry>\r
+               <author>\r
+                       <name>Lindsey Smith</name>\r
+                                               <uri>http://www.gerundinganimal.com</uri>\r
+                                       </author>\r
+               <title type="html"><![CDATA[Mac OS, rss2email and scheduling with launchd]]></title>\r
+               <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/allthingsrss/hJBr/~3/0hb7cT3sLUM/" />\r
+               <id>http://www.allthingsrss.com/rss2email/?p=131</id>\r
+               <updated>2011-08-23T15:57:37Z</updated>\r
+               <published>2011-08-23T15:57:37Z</published>\r
+               <category scheme="http://www.allthingsrss.com/rss2email" term="Uncategorized" />                <summary type="html"><![CDATA[Just a little FYI if you encounter this: MacRumors user durlecs was having a problem scheduling rss2email with launchd, Mac OS&#8217;s built in replacement for cron and other UNIX services. It looks like he/she got it working in the end by adding the path to Python into the PATH environment variable.]]></summary>\r
+               <content type="html" xml:base="http://www.allthingsrss.com/rss2email/2011/08/mac-os-rss2email-and-scheduling-with-launchd/">&lt;p&gt;Just a little FYI if you encounter this: MacRumors user durlecs was having a &lt;a href="http://forums.macrumors.com/showthread.php?t=1216694" target="_blank"&gt;problem scheduling rss2email with launchd&lt;/a&gt;, Mac OS&amp;#8217;s built in replacement for cron and other UNIX services. It looks like he/she got it working in the end by adding the path to Python into the PATH environment variable.&lt;/p&gt;\r
+\r
+&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/0Q4e9-dkgHhcjqmhUxC-_qJrGKA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/0Q4e9-dkgHhcjqmhUxC-_qJrGKA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;\r
+&lt;a href="http://feedads.g.doubleclick.net/~a/0Q4e9-dkgHhcjqmhUxC-_qJrGKA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/0Q4e9-dkgHhcjqmhUxC-_qJrGKA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/allthingsrss/hJBr/~4/0hb7cT3sLUM" height="1" width="1"/&gt;</content>\r
+               <link rel="replies" type="text/html" href="http://www.allthingsrss.com/rss2email/2011/08/mac-os-rss2email-and-scheduling-with-launchd/#comments" thr:count="1" />\r
+               <link rel="replies" type="application/atom+xml" href="http://www.allthingsrss.com/rss2email/2011/08/mac-os-rss2email-and-scheduling-with-launchd/feed/atom/" thr:count="1" />\r
+               <thr:total>1</thr:total>\r
+       <feedburner:origLink>http://www.allthingsrss.com/rss2email/2011/08/mac-os-rss2email-and-scheduling-with-launchd/</feedburner:origLink></entry>\r
+               <entry>\r
+               <author>\r
+                       <name>Lindsey Smith</name>\r
+                                               <uri>http://www.gerundinganimal.com</uri>\r
+                                       </author>\r
+               <title type="html"><![CDATA[Version 2.71 Release plus Other Major Updates]]></title>\r
+               <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/allthingsrss/hJBr/~3/wsLSVDNzno0/" />\r
+               <id>http://www.allthingsrss.com/rss2email/?p=123</id>\r
+               <updated>2011-03-04T18:03:11Z</updated>\r
+               <published>2011-03-04T18:03:11Z</published>\r
+               <category scheme="http://www.allthingsrss.com/rss2email" term="Uncategorized" />                <summary type="html"><![CDATA[Good news everyone! Two important tools that rss2email depends on have recently received major upgrades: feedparser and html2text. These should improve rss2email&#8217;s ability to handle feeds with poorly formed HTML and other weirdness. The rss2email application itself also needed to be upgraded some to support these. Changes in this version: Upgraded to feedparser v5.01! (http://code.google.com/p/feedparser/) [...]]]></summary>\r
+               <content type="html" xml:base="http://www.allthingsrss.com/rss2email/2011/03/version-2-71-release-plus-other-major-updates/">&lt;p&gt;Good news everyone! Two important tools that rss2email depends on have recently received major upgrades: &lt;a href="http://code.google.com/p/feedparser/"&gt;feedparser&lt;/a&gt; and &lt;a href="https://github.com/aaronsw/html2text"&gt;html2text&lt;/a&gt;. These should improve rss2email&amp;#8217;s ability to handle feeds with poorly formed HTML and other weirdness.&lt;/p&gt;\r
+&lt;p&gt;The rss2email application itself also needed to be upgraded some to support these. Changes in this version:&lt;/p&gt;\r
+&lt;ul&gt;\r
+&lt;li&gt;Upgraded to feedparser v5.01! (http://code.google.com/p/feedparser/)\r
+&lt;li&gt;Upgraded to html2text v3.01! (https://github.com/aaronsw/html2text)\r
+&lt;li&gt;Potentially safer method for writing feeds.dat on UNIX\r
+&lt;li&gt;Handle via links with no title attribute\r
+&lt;li&gt;Handle attributes more cleanly with OVERRIDE_EMAIL and DEFAULT_EMAIL\r
+&lt;/ul&gt;\r
+\r
+&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/mPc_o2aCgPYkdQhi-IMAOP4LbS0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mPc_o2aCgPYkdQhi-IMAOP4LbS0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;\r
+&lt;a href="http://feedads.g.doubleclick.net/~a/mPc_o2aCgPYkdQhi-IMAOP4LbS0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mPc_o2aCgPYkdQhi-IMAOP4LbS0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/allthingsrss/hJBr/~4/wsLSVDNzno0" height="1" width="1"/&gt;</content>\r
+               <link rel="replies" type="text/html" href="http://www.allthingsrss.com/rss2email/2011/03/version-2-71-release-plus-other-major-updates/#comments" thr:count="62" />\r
+               <link rel="replies" type="application/atom+xml" href="http://www.allthingsrss.com/rss2email/2011/03/version-2-71-release-plus-other-major-updates/feed/atom/" thr:count="62" />\r
+               <thr:total>62</thr:total>\r
+       <feedburner:origLink>http://www.allthingsrss.com/rss2email/2011/03/version-2-71-release-plus-other-major-updates/</feedburner:origLink></entry>\r
+               <entry>\r
+               <author>\r
+                       <name>Lindsey Smith</name>\r
+                                               <uri>http://www.gerundinganimal.com</uri>\r
+                                       </author>\r
+               <title type="html"><![CDATA[Version 2.70 Released]]></title>\r
+               <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/allthingsrss/hJBr/~3/0rUaRcCJ8dU/" />\r
+               <id>http://www.allthingsrss.com/rss2email/?p=106</id>\r
+               <updated>2010-12-21T20:00:49Z</updated>\r
+               <published>2010-12-21T20:00:49Z</published>\r
+               <category scheme="http://www.allthingsrss.com/rss2email" term="Uncategorized" />                <summary type="html"><![CDATA[Version 2.70 of rss2email is now available for both Linux and Windows. Changes from the previous version: Improved handling of given feed email addresses to prevent mail servers rejecting poorly formed Froms Added X-RSS-TAGS header that lists any tags provided by an entry, which will be helpful in filtering incoming messages Complete list in the [...]]]></summary>\r
+               <content type="html" xml:base="http://www.allthingsrss.com/rss2email/2010/12/version-2-70-released/">&lt;p&gt;Version 2.70 of rss2email is now available for both &lt;a href="http://www.allthingsrss.com/rss2email/rss2email-2.70.tar.gz"&gt;Linux&lt;/a&gt; and &lt;a href="http://www.allthingsrss.com/rss2email/rss2email-2.70.zip"&gt;Windows&lt;/a&gt;.&lt;/p&gt;\r
+&lt;p&gt;Changes from the previous version:&lt;/p&gt;\r
+&lt;ul&gt;\r
+&lt;li&gt;Improved handling of given feed email addresses to prevent mail servers rejecting poorly formed Froms\r
+&lt;li&gt;Added X-RSS-TAGS header that lists any tags provided by an entry, which will be helpful in filtering incoming messages\r
+&lt;/ul&gt;\r
+&lt;p&gt;Complete list in the official &lt;a href="http://www.allthingsrss.com/rss2email/changelog"&gt;CHANGELOG&lt;/a&gt;.&lt;/p&gt;\r
+\r
+&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/3-mTadqlwiwGd3BGVmqYMI2xAyg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/3-mTadqlwiwGd3BGVmqYMI2xAyg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;\r
+&lt;a href="http://feedads.g.doubleclick.net/~a/3-mTadqlwiwGd3BGVmqYMI2xAyg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/3-mTadqlwiwGd3BGVmqYMI2xAyg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/allthingsrss/hJBr/~4/0rUaRcCJ8dU" height="1" width="1"/&gt;</content>\r
+               <link rel="replies" type="text/html" href="http://www.allthingsrss.com/rss2email/2010/12/version-2-70-released/#comments" thr:count="10" />\r
+               <link rel="replies" type="application/atom+xml" href="http://www.allthingsrss.com/rss2email/2010/12/version-2-70-released/feed/atom/" thr:count="10" />\r
+               <thr:total>10</thr:total>\r
+       <feedburner:origLink>http://www.allthingsrss.com/rss2email/2010/12/version-2-70-released/</feedburner:origLink></entry>\r
+               <entry>\r
+               <author>\r
+                       <name>Lindsey Smith</name>\r
+                                               <uri>http://www.gerundinganimal.com</uri>\r
+                                       </author>\r
+               <title type="html"><![CDATA[Mac OS X and rss2email are Compatible]]></title>\r
+               <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/allthingsrss/hJBr/~3/cILvxh4ziQg/" />\r
+               <id>http://www.allthingsrss.com/rss2email/?p=99</id>\r
+               <updated>2010-12-17T20:54:27Z</updated>\r
+               <published>2010-12-17T20:54:27Z</published>\r
+               <category scheme="http://www.allthingsrss.com/rss2email" term="Uncategorized" />                <summary type="html"><![CDATA[rss2email user Jon Thompson has reported that Linux rss2email works well under Mac OS X. This is good news, but not to surprising since Apple based OS X on UNIX. Technically the rss2email Linux package usually works on other UNIX-derived OSs, such as CentOS and BSD. They aren&#8217;t officially supported, but we usually try resolve [...]]]></summary>\r
+               <content type="html" xml:base="http://www.allthingsrss.com/rss2email/2010/12/mac-os-x-and-rss2email-are-compatible/">&lt;p&gt;rss2email user Jon Thompson has reported that Linux rss2email works well under Mac OS X. This is good news, but not to surprising since Apple based OS X on UNIX.&lt;/p&gt;\r
+&lt;p&gt;Technically the rss2email Linux package usually works on other UNIX-derived OSs, such as CentOS and BSD. They aren&amp;#8217;t officially supported, but we usually try resolve incompatibilities if possible.&lt;/p&gt;\r
+\r
+&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/n8I-3iyxNsT7ki6avOy7J2DFJk8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/n8I-3iyxNsT7ki6avOy7J2DFJk8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;\r
+&lt;a href="http://feedads.g.doubleclick.net/~a/n8I-3iyxNsT7ki6avOy7J2DFJk8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/n8I-3iyxNsT7ki6avOy7J2DFJk8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/allthingsrss/hJBr/~4/cILvxh4ziQg" height="1" width="1"/&gt;</content>\r
+               <link rel="replies" type="text/html" href="http://www.allthingsrss.com/rss2email/2010/12/mac-os-x-and-rss2email-are-compatible/#comments" thr:count="8" />\r
+               <link rel="replies" type="application/atom+xml" href="http://www.allthingsrss.com/rss2email/2010/12/mac-os-x-and-rss2email-are-compatible/feed/atom/" thr:count="8" />\r
+               <thr:total>8</thr:total>\r
+       <feedburner:origLink>http://www.allthingsrss.com/rss2email/2010/12/mac-os-x-and-rss2email-are-compatible/</feedburner:origLink></entry>\r
+               <entry>\r
+               <author>\r
+                       <name>Lindsey Smith</name>\r
+                                               <uri>http://www.gerundinganimal.com</uri>\r
+                                       </author>\r
+               <title type="html"><![CDATA[Minor correction to the minor correction: v2.69a released]]></title>\r
+               <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/allthingsrss/hJBr/~3/VgWvylH6fvk/" />\r
+               <id>http://www.allthingsrss.com/rss2email/?p=95</id>\r
+               <updated>2010-12-13T18:04:20Z</updated>\r
+               <published>2010-12-13T18:04:20Z</published>\r
+               <category scheme="http://www.allthingsrss.com/rss2email" term="Uncategorized" />                <summary type="html"><![CDATA[Last week I made a slight change to the v2.69 rss2email packages, which can cause suspicion that they have been tampered with. To mitigate this, I put the original v2.69 files back in place and renamed the updated package set to v2.69a. Here is v2.69a: Linux and Windows And here is the original v2.69: Linux [...]]]></summary>\r
+               <content type="html" xml:base="http://www.allthingsrss.com/rss2email/2010/12/minor-correction-to-the-minor-correction-v2-69a-released/">&lt;p&gt;Last week I made a &lt;a href="http://www.allthingsrss.com/rss2email/2010/12/minor-correction-to-v2-69-packages/"&gt;slight change to the v2.69 rss2email packages&lt;/a&gt;, which can cause suspicion that they have been tampered with. To mitigate this, I put the original v2.69 files back in place and renamed the updated package set to v2.69a.&lt;/p&gt;\r
+&lt;p&gt;Here is v2.69a: &lt;a href="http://www.allthingsrss.com/rss2email/rss2email-2.69a.tar.gz"&gt;Linux&lt;/a&gt; and &lt;a href="http://www.allthingsrss.com/rss2email/rss2email-2.69a.zip"&gt;Windows&lt;/a&gt;&lt;br /&gt;\r
+And here is the original v2.69: &lt;a href="http://www.allthingsrss.com/rss2email/rss2email-2.69.tar.gz"&gt;Linux&lt;/a&gt; and &lt;a href="http://www.allthingsrss.com/rss2email/rss2email-2.69.zip"&gt;Windows&lt;/a&gt;&lt;/p&gt;\r
+\r
+&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/a817YdrxPE_g34wXU-SAzQ6UihM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/a817YdrxPE_g34wXU-SAzQ6UihM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;\r
+&lt;a href="http://feedads.g.doubleclick.net/~a/a817YdrxPE_g34wXU-SAzQ6UihM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/a817YdrxPE_g34wXU-SAzQ6UihM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/allthingsrss/hJBr/~4/VgWvylH6fvk" height="1" width="1"/&gt;</content>\r
+               <link rel="replies" type="text/html" href="http://www.allthingsrss.com/rss2email/2010/12/minor-correction-to-the-minor-correction-v2-69a-released/#comments" thr:count="1" />\r
+               <link rel="replies" type="application/atom+xml" href="http://www.allthingsrss.com/rss2email/2010/12/minor-correction-to-the-minor-correction-v2-69a-released/feed/atom/" thr:count="1" />\r
+               <thr:total>1</thr:total>\r
+       <feedburner:origLink>http://www.allthingsrss.com/rss2email/2010/12/minor-correction-to-the-minor-correction-v2-69a-released/</feedburner:origLink></entry>\r
+               <entry>\r
+               <author>\r
+                       <name>Lindsey Smith</name>\r
+                                               <uri>http://www.gerundinganimal.com</uri>\r
+                                       </author>\r
+               <title type="html"><![CDATA[Minor Correction to v2.69 Packages]]></title>\r
+               <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/allthingsrss/hJBr/~3/CiODBX5_NSk/" />\r
+               <id>http://www.allthingsrss.com/rss2email/?p=88</id>\r
+               <updated>2010-12-10T17:47:58Z</updated>\r
+               <published>2010-12-10T17:47:58Z</published>\r
+               <category scheme="http://www.allthingsrss.com/rss2email" term="Uncategorized" />                <summary type="html"><![CDATA[The v2.69 rss2email packages contain an example config.py file that might accidentally overwrite an existing config.py file. To keep this from happening I&#8217;ve updated both the Linux and Windows by simply renaming the file to config.py.example.]]></summary>\r
+               <content type="html" xml:base="http://www.allthingsrss.com/rss2email/2010/12/minor-correction-to-v2-69-packages/">&lt;p&gt;The v2.69 rss2email packages contain an example config.py file that might accidentally overwrite an existing config.py file. To keep this from happening I&amp;#8217;ve updated both the &lt;a href="http://www.allthingsrss.com/rss2email/rss2email-2.69.tar.gz"&gt;Linux&lt;/a&gt; and &lt;a href="http://www.allthingsrss.com/rss2email/rss2email-2.69.zip"&gt;Windows&lt;/a&gt; by simply renaming the file to config.py.example.&lt;/p&gt;\r
+\r
+&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/V9Hd_J59X3SfWg3Q2XbjLNcdusA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/V9Hd_J59X3SfWg3Q2XbjLNcdusA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;\r
+&lt;a href="http://feedads.g.doubleclick.net/~a/V9Hd_J59X3SfWg3Q2XbjLNcdusA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/V9Hd_J59X3SfWg3Q2XbjLNcdusA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/allthingsrss/hJBr/~4/CiODBX5_NSk" height="1" width="1"/&gt;</content>\r
+               <link rel="replies" type="text/html" href="http://www.allthingsrss.com/rss2email/2010/12/minor-correction-to-v2-69-packages/#comments" thr:count="7" />\r
+               <link rel="replies" type="application/atom+xml" href="http://www.allthingsrss.com/rss2email/2010/12/minor-correction-to-v2-69-packages/feed/atom/" thr:count="7" />\r
+               <thr:total>7</thr:total>\r
+       <feedburner:origLink>http://www.allthingsrss.com/rss2email/2010/12/minor-correction-to-v2-69-packages/</feedburner:origLink></entry>\r
+               <entry>\r
+               <author>\r
+                       <name>Lindsey Smith</name>\r
+                                               <uri>http://www.gerundinganimal.com</uri>\r
+                                       </author>\r
+               <title type="html"><![CDATA[Version 2.69 Released]]></title>\r
+               <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/allthingsrss/hJBr/~3/ubaE55Le1OU/" />\r
+               <id>http://www.allthingsrss.com/rss2email/?p=85</id>\r
+               <updated>2010-11-12T18:45:08Z</updated>\r
+               <published>2010-11-12T18:45:08Z</published>\r
+               <category scheme="http://www.allthingsrss.com/rss2email" term="Uncategorized" />                <summary type="html"><![CDATA[Version 2.69 of rss2email is now available for both Linux and Windows. Changes from the previous version: Added support for connecting to SMTP server via SSL, see SMTP_SSL option Improved backwards compatibility by fixing issue with listing feeds when run with older Python versions Added selective feed email overrides through OVERRIDE_EMAIL and DEFAULT_EMAIL options Added [...]]]></summary>\r
+               <content type="html" xml:base="http://www.allthingsrss.com/rss2email/2010/11/version-2-69-released/">&lt;p&gt;Version 2.69 of rss2email is now available for both &lt;a href="http://www.allthingsrss.com/rss2email/rss2email-2.69.tar.gz"&gt;Linux&lt;/a&gt; and &lt;a href="http://www.allthingsrss.com/rss2email/rss2email-2.69.zip"&gt;Windows&lt;/a&gt;.&lt;/p&gt;\r
+&lt;p&gt;Changes from the previous version:&lt;/p&gt;\r
+&lt;ul&gt;\r
+&lt;li&gt;Added support for connecting to SMTP server via SSL, see SMTP_SSL option\r
+&lt;li&gt;Improved backwards compatibility by fixing issue with listing feeds when run with older Python versions\r
+&lt;li&gt;Added selective feed email overrides through OVERRIDE_EMAIL and DEFAULT_EMAIL options\r
+&lt;li&gt;Added NO_FRIENDLY_NAME to from from address only without the friendly name\r
+&lt;li&gt;Added X-RSS-URL header in each message with the link to the original item\r
+&lt;/ul&gt;\r
+&lt;p&gt;Complete list in the official &lt;a href="http://www.allthingsrss.com/rss2email/changelog"&gt;CHANGELOG&lt;/a&gt;.&lt;/p&gt;\r
+\r
+&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ygS5IVjPi9xnNjTZA1SFTAzPtuA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ygS5IVjPi9xnNjTZA1SFTAzPtuA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;\r
+&lt;a href="http://feedads.g.doubleclick.net/~a/ygS5IVjPi9xnNjTZA1SFTAzPtuA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ygS5IVjPi9xnNjTZA1SFTAzPtuA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/allthingsrss/hJBr/~4/ubaE55Le1OU" height="1" width="1"/&gt;</content>\r
+               <link rel="replies" type="text/html" href="http://www.allthingsrss.com/rss2email/2010/11/version-2-69-released/#comments" thr:count="10" />\r
+               <link rel="replies" type="application/atom+xml" href="http://www.allthingsrss.com/rss2email/2010/11/version-2-69-released/feed/atom/" thr:count="10" />\r
+               <thr:total>10</thr:total>\r
+       <feedburner:origLink>http://www.allthingsrss.com/rss2email/2010/11/version-2-69-released/</feedburner:origLink></entry>\r
+               <entry>\r
+               <author>\r
+                       <name>Lindsey Smith</name>\r
+                                               <uri>http://www.gerundinganimal.com</uri>\r
+                                       </author>\r
+               <title type="html"><![CDATA[How to Read RSS Feeds in Emacs]]></title>\r
+               <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/allthingsrss/hJBr/~3/JryfOLe_q6c/" />\r
+               <id>http://www.allthingsrss.com/rss2email/?p=79</id>\r
+               <updated>2010-11-05T17:36:14Z</updated>\r
+               <published>2010-11-05T17:36:14Z</published>\r
+               <category scheme="http://www.allthingsrss.com/rss2email" term="Uncategorized" />                <summary type="html"><![CDATA[Emacs and rss2email user Erik Hetzner has written up a tutorial on how he integrated RSS feed reading into Emacs using rss2email.]]></summary>\r
+               <content type="html" xml:base="http://www.allthingsrss.com/rss2email/2010/11/rss-in-emac/">&lt;p&gt;Emacs and rss2email user Erik Hetzner has written up a tutorial on how he integrated &lt;a href="http://www.emacswiki.org/emacs/HOWTOReadFeedsInEmacsViaEmail"&gt;RSS feed reading into Emacs&lt;/a&gt; using rss2email.&lt;/p&gt;\r
+\r
+&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/W185EjeIKKNPfRCWp9sV0gDrfJk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/W185EjeIKKNPfRCWp9sV0gDrfJk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;\r
+&lt;a href="http://feedads.g.doubleclick.net/~a/W185EjeIKKNPfRCWp9sV0gDrfJk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/W185EjeIKKNPfRCWp9sV0gDrfJk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/allthingsrss/hJBr/~4/JryfOLe_q6c" height="1" width="1"/&gt;</content>\r
+               <link rel="replies" type="text/html" href="http://www.allthingsrss.com/rss2email/2010/11/rss-in-emac/#comments" thr:count="0" />\r
+               <link rel="replies" type="application/atom+xml" href="http://www.allthingsrss.com/rss2email/2010/11/rss-in-emac/feed/atom/" thr:count="0" />\r
+               <thr:total>0</thr:total>\r
+       <feedburner:origLink>http://www.allthingsrss.com/rss2email/2010/11/rss-in-emac/</feedburner:origLink></entry>\r
+               <entry>\r
+               <author>\r
+                       <name>Lindsey Smith</name>\r
+                                               <uri>http://www.gerundinganimal.com</uri>\r
+                                       </author>\r
+               <title type="html"><![CDATA[Version 2.68 Released with Actual New Features]]></title>\r
+               <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/allthingsrss/hJBr/~3/bT-I0iH2vw8/" />\r
+               <id>http://www.allthingsrss.com/rss2email/?p=72</id>\r
+               <updated>2010-10-01T18:21:26Z</updated>\r
+               <published>2010-10-01T18:21:26Z</published>\r
+               <category scheme="http://www.allthingsrss.com/rss2email" term="Uncategorized" />                <summary type="html"><![CDATA[Unlike the last few versions of rss2email that have trickled out, I finally got around to adding a few new oft-requested features! Version 2.68 of rss2email is now available for both Linux and Windows. Changes from the previous version: Added ability to pause/resume checking of individual feeds through pause and unpause commands Added ability to [...]]]></summary>\r
+               <content type="html" xml:base="http://www.allthingsrss.com/rss2email/2010/10/version-2-68-released-with-actual-new-features/">&lt;p&gt;Unlike the last few versions of rss2email that have trickled out, I finally got around to adding a few new oft-requested features! Version 2.68 of rss2email is now available for both &lt;a href="http://www.allthingsrss.com/rss2email/rss2email-2.68.tar.gz"&gt;Linux&lt;/a&gt; and &lt;a href="http://www.allthingsrss.com/rss2email/rss2email-2.68.zip"&gt;Windows&lt;/a&gt;.&lt;/p&gt;\r
+&lt;p&gt;Changes from the previous version:&lt;/p&gt;\r
+&lt;ul&gt;\r
+&lt;li&gt;Added ability to pause/resume checking of individual feeds through pause and unpause commands&lt;/li&gt;\r
+&lt;li&gt;Added ability to import and export OPML feed lists through importopml and exportopml commands&lt;/li&gt;\r
+&lt;/ul&gt;\r
+&lt;p&gt;Complete list in the official &lt;a href="http://www.allthingsrss.com/rss2email/changelog"&gt;CHANGELOG&lt;/a&gt;.&lt;/p&gt;\r
+&lt;p&gt;&lt;strong&gt;Pause/Unpause&lt;/strong&gt;&lt;/p&gt;\r
+&lt;p&gt;Through &lt;code&gt;r2e pause &lt;em&gt;n&lt;/em&gt;&lt;/code&gt; where &lt;em&gt;n&lt;/em&gt; is a feed number, you can temporarily suspend checking that feed for new content. To start checking it again, simply run &lt;code&gt;r2e unpause &lt;em&gt;n&lt;/em&gt;&lt;/code&gt;. When you &lt;code&gt;r2e list&lt;/code&gt;, an asterisk indicates that the feed is currently unpaused and active.&lt;/p&gt;\r
+&lt;p&gt;&lt;strong&gt;OMPL Import/Export&lt;/strong&gt;&lt;/p&gt;\r
+&lt;p&gt;&lt;a href="http://en.wikipedia.org/wiki/OPML"&gt;OPML&lt;/a&gt; is an XML format commonly used to exchange a list of RSS feeds between applications. &lt;code&gt;r2e opmlexport &amp;gt; &lt;em&gt;filename&lt;/em&gt;&lt;/code&gt; will give you a file that you can use to import your list of feeds into another application. If you&amp;#8217;ve exported feeds from another application into a file, &lt;code&gt;r2e opmlimport &lt;em&gt;filename&lt;/em&gt;&lt;/code&gt; will add those feeds to your rss2email feed list.&lt;/p&gt;\r
+\r
+&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/nYgTsIUsS9pmvRZ6092XGGHnNKg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/nYgTsIUsS9pmvRZ6092XGGHnNKg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;\r
+&lt;a href="http://feedads.g.doubleclick.net/~a/nYgTsIUsS9pmvRZ6092XGGHnNKg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/nYgTsIUsS9pmvRZ6092XGGHnNKg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/allthingsrss/hJBr/~4/bT-I0iH2vw8" height="1" width="1"/&gt;</content>\r
+               <link rel="replies" type="text/html" href="http://www.allthingsrss.com/rss2email/2010/10/version-2-68-released-with-actual-new-features/#comments" thr:count="17" />\r
+               <link rel="replies" type="application/atom+xml" href="http://www.allthingsrss.com/rss2email/2010/10/version-2-68-released-with-actual-new-features/feed/atom/" thr:count="17" />\r
+               <thr:total>17</thr:total>\r
+       <feedburner:origLink>http://www.allthingsrss.com/rss2email/2010/10/version-2-68-released-with-actual-new-features/</feedburner:origLink></entry>\r
+               <entry>\r
+               <author>\r
+                       <name>Lindsey Smith</name>\r
+                                               <uri>http://www.gerundinganimal.com</uri>\r
+                                       </author>\r
+               <title type="html"><![CDATA[Version 2.67 Released]]></title>\r
+               <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/allthingsrss/hJBr/~3/aGbf5Gefkmc/" />\r
+               <id>http://www.allthingsrss.com/rss2email/?p=62</id>\r
+               <updated>2010-09-21T16:55:07Z</updated>\r
+               <published>2010-09-21T16:55:07Z</published>\r
+               <category scheme="http://www.allthingsrss.com/rss2email" term="Uncategorized" />                <summary type="html"><![CDATA[Version 2.67 of rss2email is now available for both Linux and Windows, which includes the latest development version of feedparser. Changes from the previous version: Fixed entries that include an id which is blank (i.e., an empty string) were being resent Fixed some entries not being sent by email because they had bad From headers [...]]]></summary>\r
+               <content type="html" xml:base="http://www.allthingsrss.com/rss2email/2010/09/version-2-67-released/">&lt;p&gt;Version 2.67 of rss2email is now available for both &lt;a href="http://www.allthingsrss.com/rss2email/rss2email-2.67.tar.gz"&gt;Linux&lt;/a&gt; and &lt;a href="http://www.allthingsrss.com/rss2email/rss2email-2.67.zip"&gt;Windows&lt;/a&gt;, which includes the latest development version of feedparser. Changes from the previous version:&lt;/p&gt;\r
+&lt;ul&gt;\r
+&lt;li&gt;Fixed entries that include an id which is blank (i.e., an empty string) were being resent&lt;/li&gt;\r
+&lt;li&gt;Fixed some entries not being sent by email because they had bad From headers&lt;/li&gt;\r
+&lt;li&gt;Fixed From headers with HTML entities encoded twice&lt;/li&gt;\r
+&lt;li&gt;Compatibility changes to support most recent development versions of feedparser&lt;/li&gt;\r
+&lt;li&gt;Compatibility changes to support Google Reader feeds&lt;/li&gt;\r
+&lt;/ul&gt;\r
+&lt;p&gt;Complete list in the official &lt;a href="http://www.allthingsrss.com/rss2email/changelog"&gt;CHANGELOG&lt;/a&gt;.&lt;/p&gt;\r
+&lt;ul&gt;&lt;/ul&gt;\r
+\r
+&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Sjq8v-Lq2dNKzkelsypiC4fjPLM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Sjq8v-Lq2dNKzkelsypiC4fjPLM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;\r
+&lt;a href="http://feedads.g.doubleclick.net/~a/Sjq8v-Lq2dNKzkelsypiC4fjPLM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Sjq8v-Lq2dNKzkelsypiC4fjPLM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/allthingsrss/hJBr/~4/aGbf5Gefkmc" height="1" width="1"/&gt;</content>\r
+               <link rel="replies" type="text/html" href="http://www.allthingsrss.com/rss2email/2010/09/version-2-67-released/#comments" thr:count="1" />\r
+               <link rel="replies" type="application/atom+xml" href="http://www.allthingsrss.com/rss2email/2010/09/version-2-67-released/feed/atom/" thr:count="1" />\r
+               <thr:total>1</thr:total>\r
+       <feedburner:origLink>http://www.allthingsrss.com/rss2email/2010/09/version-2-67-released/</feedburner:origLink></entry>\r
+       </feed><!-- Dynamic page generated in 0.562 seconds. --><!-- Cached page generated by WP-Super-Cache on 2012-09-25 06:06:45 -->\r
diff --git a/test/test.py b/test/test.py
new file mode 100755 (executable)
index 0000000..fc26fc7
--- /dev/null
@@ -0,0 +1,106 @@
+#!/usr/bin/env python3
+
+"""Test processing logic on known feeds.
+"""
+
+import difflib as _difflib
+import glob as _glob
+import io as _io
+import logging as _logging
+import os as _os
+
+import rss2email as _rss2email
+
+
+# Get a copy of the internal rss2email.CONFIG for copying
+_stringio = _io.StringIO()
+_rss2email.CONFIG.write(_stringio)
+BASE_CONFIG_STRING = _stringio.getvalue()
+del _stringio
+
+
+class Send (list):
+    def __call__(self, sender, message):
+        self.append((sender, message))
+
+    def as_string(self):
+        chunks = [
+            'SENT TO: {}\n{}\n'.format(sender, message.as_string())
+            for sender,message in self]
+        return '\n'.join(chunks)
+
+
+def test(dirname=None, config_path=None, force=False):
+    if dirname is None:
+        dirname = _os.path.dirname(config_path)
+    if config_path is None:
+        _rss2email.LOG.info('testing {}'.format(dirname))
+        for config_path in _glob.glob(_os.path.join(dirname, '*.config')):
+            test(dirname=dirname, config_path=config_path, force=force)
+        return
+    feed_path = _glob.glob(_os.path.join(dirname, 'feed.*'))[0]
+    _rss2email.LOG.info('testing {}'.format(config_path))
+    config = _rss2email.Config()
+    config.read_string(BASE_CONFIG_STRING)
+    read_paths = config.read([config_path])
+    feed = _rss2email.Feed(name='test', url=feed_path, config=config)
+    expected_path = config_path.replace('config', 'expected')
+    with open(expected_path, 'r') as f:
+        expected = f.read()
+    feed._send = Send()
+    feed.run()
+    generated = feed._send.as_string()
+    if force:
+        with open(expected_path, 'w') as f:
+            f.write(generated)
+    if generated != expected:
+        diff_lines = _difflib.unified_diff(
+            expected.splitlines(), generated.splitlines(),
+            'expected', 'generated', lineterm='')
+        raise ValueError(
+            'error processing {}\n{}'.format(
+                config_path,
+                '\n'.join(diff_lines)))
+
+
+if __name__ == '__main__':
+    import argparse
+
+    parser = argparse.ArgumentParser(description=__doc__)
+    parser.add_argument(
+        '--force', action='store_const', const=True,
+        help=(
+            "write output files (useful for figuring out what's expected "
+            'from a new feed).'))
+    parser.add_argument(
+        '-V', '--verbose', default=0, action='count',
+        help='increment verbosity')
+    parser.add_argument(
+        'dir', nargs='*',
+        help='select subdirs to test (tests all subdirs by default)')
+
+    args = parser.parse_args()
+
+    if args.verbose:
+        _rss2email.LOG.setLevel(
+            max(_logging.DEBUG, _logging.ERROR - 10 * args.verbose))
+
+    # no paths on the command line, find all subdirectories
+    this_dir = _os.path.dirname(__file__)
+    if not args.dir:
+        for basename in _os.listdir(this_dir):
+            path = _os.path.join(this_dir, basename)
+            if _os.path.isdir(path):
+                args.dir.append(path)
+
+    # we need standardized URLs, so change to `this_dir` and adjust paths
+    orig_dir = _os.getcwd()
+    _os.chdir(this_dir)
+
+    # run tests
+    for orig_path in args.dir:
+        this_path = _os.path.relpath(orig_path, start=this_dir)
+        if _os.path.isdir(this_path):
+            test(dirname=this_path, force=args.force)
+        else:
+            test(config_path=this_path, force=args.force)