summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbeatrice <beatrice@dangofactory.net>2026-11-22 20:03:16 +0900
committerbeatrice <beatrice@dangofactory.net>2026-11-22 20:03:16 +0900
commitd40cbda03a10559cbd8a8ae3ac3566d6fa94b7f8 (patch)
tree7f9d3b9d19d5ca12dc36a45f31f0562a342e0ad4
downloadblosxom-master.tar.gz
blosxom-master.zip
Import blosxom-2.2.0.tar.gzHEADlocal/blosxommaster
-rw-r--r--.perltidyrc16
-rw-r--r--ChangeLog80
-rw-r--r--Makefile15
-rwxr-xr-xblosxom.cgi1064
l---------t/01_templates.t1
l---------t/02_smoketest.t1
l---------t/03_interpolate.t1
l---------t/03_permalinks.t1
l---------t/04_plugin_dir.t1
l---------t/04_plugin_list.t1
l---------t/08_static_basic.t1
l---------t/09_static_configure.t1
-rw-r--r--t/Makefile6
-rw-r--r--t/README78
-rw-r--r--t/driver144
-rw-r--r--t/interpolate/config/blosxom.conf29
-rw-r--r--t/interpolate/data/content_type.html1
-rw-r--r--t/interpolate/data/date.html1
-rw-r--r--t/interpolate/data/foot.html2
-rw-r--r--t/interpolate/data/head.html28
-rw-r--r--t/interpolate/data/story.html3
-rw-r--r--t/interpolate/expected.html32
-rw-r--r--t/interpolate/spec.yaml4
-rw-r--r--t/permalinks/config/blosxom.conf2
-rw-r--r--t/permalinks/data/foo/bar.txt4
-rw-r--r--t/permalinks/data/foo/bar.txt.2006072511024
-rw-r--r--t/permalinks/data/foo/baz.txt8
-rw-r--r--t/permalinks/data/foo/baz.txt.2006072511038
-rw-r--r--t/permalinks/expected.bar28
-rw-r--r--t/permalinks/expected.html39
-rw-r--r--t/permalinks/expected.rss34
-rw-r--r--t/permalinks/spec.yaml18
-rw-r--r--t/plugin_dir/README1
-rw-r--r--t/plugin_dir/config/blosxom.conf5
-rw-r--r--t/plugin_dir/data/1.txt4
-rw-r--r--t/plugin_dir/data/date.html1
-rw-r--r--t/plugin_dir/data/foot.html2
-rw-r--r--t/plugin_dir/data/head.html6
-rw-r--r--t/plugin_dir/data/story.html2
-rw-r--r--t/plugin_dir/expected.html22
-rw-r--r--t/plugin_dir/plugins/02plugin23
-rw-r--r--t/plugin_dir/plugins/04plugin4_3
-rw-r--r--t/plugin_dir/plugins/dump_plugins5
-rw-r--r--t/plugin_dir/plugins/plugin13
-rw-r--r--t/plugin_dir/plugins/plugin3_3
-rw-r--r--t/plugin_dir/spec.yaml4
-rw-r--r--t/plugin_list/README1
-rw-r--r--t/plugin_list/config/blosxom.conf5
-rw-r--r--t/plugin_list/config/plugins.conf19
-rw-r--r--t/plugin_list/data/1.txt4
-rw-r--r--t/plugin_list/data/date.html1
-rw-r--r--t/plugin_list/data/foot.html2
-rw-r--r--t/plugin_list/data/head.html6
-rw-r--r--t/plugin_list/data/story.html2
-rw-r--r--t/plugin_list/expected.html22
-rw-r--r--t/plugin_list/plugins/dump_plugins5
-rw-r--r--t/plugin_list/plugins/plugin13
-rw-r--r--t/plugin_list/plugins/plugin23
-rw-r--r--t/plugin_list/plugins/plugin33
-rw-r--r--t/plugin_list/plugins/plugin43
-rw-r--r--t/plugin_list/plugins/plugin53
-rw-r--r--t/plugin_list/spec.yaml4
-rw-r--r--t/smoketest/config/blosxom.conf2
-rw-r--r--t/smoketest/data/.0.txt10
-rw-r--r--t/smoketest/data/1.txt16
-rw-r--r--t/smoketest/data/1.txt.20060719225416
-rw-r--r--t/smoketest/expected.html40
-rw-r--r--t/smoketest/expected.rss36
-rw-r--r--t/smoketest/spec.yaml7
-rw-r--r--t/static_basic/config/blosxom.conf4
-rw-r--r--t/static_basic/config/plugins.conf0
-rw-r--r--t/static_basic/data/1.txt16
-rw-r--r--t/static_basic/data/1.txt.20060719225416
-rw-r--r--t/static_basic/data/content_type.html1
-rw-r--r--t/static_basic/data/date.html1
-rw-r--r--t/static_basic/data/foot.html3
-rw-r--r--t/static_basic/data/head.html11
-rw-r--r--t/static_basic/data/story.html3
-rw-r--r--t/static_basic/expected/2006/07/19/index.html32
-rw-r--r--t/static_basic/expected/2006/07/19/index.rss34
-rw-r--r--t/static_basic/expected/2006/07/index.html32
-rw-r--r--t/static_basic/expected/2006/07/index.rss34
-rw-r--r--t/static_basic/expected/2006/index.html32
-rw-r--r--t/static_basic/expected/2006/index.rss34
-rw-r--r--t/static_basic/expected/index.html32
-rw-r--r--t/static_basic/expected/index.rss34
-rw-r--r--t/static_basic/spec.yaml1
-rw-r--r--t/static_configure/config/blosxom.conf6
-rw-r--r--t/static_configure/config/plugins.conf0
-rw-r--r--t/static_configure/data/1.txt16
-rw-r--r--t/static_configure/data/1.txt.20060719225416
-rw-r--r--t/static_configure/data/2.txt11
-rw-r--r--t/static_configure/data/2.txt.20060930123511
-rw-r--r--t/static_configure/data/content_type.html1
-rw-r--r--t/static_configure/data/date.html1
-rw-r--r--t/static_configure/data/foot.html3
-rw-r--r--t/static_configure/data/head.html10
-rw-r--r--t/static_configure/data/story.html3
-rw-r--r--t/static_configure/data/web/2.txt10
-rw-r--r--t/static_configure/data/web/2.txt.20071111111110
-rw-r--r--t/static_configure/expected/1.html31
-rw-r--r--t/static_configure/expected/1.rss34
-rw-r--r--t/static_configure/expected/2.html26
-rw-r--r--t/static_configure/expected/2.rss29
-rw-r--r--t/static_configure/expected/index.html56
-rw-r--r--t/static_configure/expected/index.rss67
-rw-r--r--t/static_configure/expected/web/2.html25
-rw-r--r--t/static_configure/expected/web/2.rss28
-rw-r--r--t/static_configure/expected/web/index.html25
-rw-r--r--t/static_configure/expected/web/index.rss28
-rw-r--r--t/static_configure/spec.yaml1
-rw-r--r--t/templates/config/blosxom.conf1
-rw-r--r--t/templates/config/plugins.conf0
-rw-r--r--t/templates/data/1.txt16
-rw-r--r--t/templates/data/1.txt.20060719225416
-rw-r--r--t/templates/data/content_type.html1
-rw-r--r--t/templates/data/date.html1
-rw-r--r--t/templates/data/foot.html3
-rw-r--r--t/templates/data/head.html10
-rw-r--r--t/templates/data/story.html3
-rw-r--r--t/templates/data/web/2.txt10
-rw-r--r--t/templates/data/web/2.txt.20071111111110
-rw-r--r--t/templates/expected.html45
-rw-r--r--t/templates/expected.rss34
-rw-r--r--t/templates/expected/index.html46
-rw-r--r--t/templates/expected/index.rss65
-rw-r--r--t/templates/expected/web/index.html28
-rw-r--r--t/templates/expected/web/index.rss43
-rw-r--r--t/templates/spec.yaml4
129 files changed, 3037 insertions, 0 deletions
diff --git a/.perltidyrc b/.perltidyrc
new file mode 100644
index 0000000..4866f1f
--- /dev/null
+++ b/.perltidyrc
@@ -0,0 +1,16 @@
+-l=78 # Max line width is 78 cols
+-i=4 # Indent level is 4 cols
+-ci=4 # Continuation indent is 4 cols
+-st # Output to STDOUT
+-se # Errors to STDERR
+-vt=2 # Maximal vertical tightness
+-cti=0 # No extra indentation for closing brackets
+-pt=1 # Medium parenthesis tightness
+-bt=1 # Medium brace tightness
+-sbt=1 # Medium square bracket tightness
+-bbt=1 # Medium block brace tightness
+-nsfs # No space before semicolons
+-nolq # Don't outdent long quoted strings
+-wbb="% + - * / x != == >= <= =~ !~ < > | & >= < = **= += *= &= <<= &&= -= /= |= >>= ||= .= %= ^= x="
+ # Break before all operators
+
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..169f795
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,80 @@
+v2.2.0
+ * Add $date_break_on_date_string config option. When enabled and the
+ date template has conditionals, its output can change and be displayed
+ while the date itself has not changed. Default: off.
+ * Add $date_first_in_url config option. When enabled, allows the date
+ components of the url to only appear at the start and allows subcategories
+ that use a year as their name. Default: off (date components can appear
+ anywhere in the url).
+ * Add $encode_8bit_chars config option. When enabled, escapes all
+ non-standard characters in the URL, which eases things for blog entries
+ with filenames in different encoding than the blog's content. Default: off.
+ * Variables $url_unesc, $path_unesc and $fn_unesc are unescaped versions
+ of URL, path and filename that may be used e.g. for displaying in flavour
+ templates.
+ * PODify the documentation in blosxom.cgi
+ * Improve unit tests.
+ * Various code clarifications.
+
+v2.1.2
+ * Fix XSS in $flavour (CVE-2008-2236). Thanks to Yoshinori Ohta of
+ Business Architects Inc. for making us aware of this issue.
+
+v2.1.1
+ * The "never trust a dot zero release" bugfix release for 2.1.0.
+ * Added CVS Id keyword to file header.
+ * Declaring $encode_xml_entities as a config option by moving it into
+ the config section -- no functionality change.
+ * Changing isPermalink back to "false" for the default RSS story
+ template because it won't be a working link in many situations.
+ This won't change the GUID, but don't let it be used as
+ anymore. That's what the <link> tag is for anyway. Thanks to Lilo
+ von Hanffstengel for pointing this out.
+ * Rewrote the (at least with Apache 2.2's environment) no more working
+ manual base URL detection code. Made it simpler, easier to
+ understand and let it only apply, if the base URL was not set
+ manually. The concept since 2.0.2 was: Always ask for the whole URI
+ and then remove the PATH_INFO in some cases again. This caused some
+ havoc. New concept is: Strip PATH_INFO from base URL if CGI.pm
+ didn't manage to do it. In those rare cases where neither CGI.pm nor
+ Blosxom manages to correctly determine the base URL, you can easily
+ set $url in the config file to the correct value and no base URL
+ magic happens anymore (except the removing of a trailing slash if
+ present -- as before). Closes: #2032685
+ * Added a lot of comments explaining the fixed problems and the
+ remaining seldom cases where manual configuration is necessary.
+
+v2.1.0
+ * unescape url returned from CGI.pm to match PATH_INFO escaping
+ * redo path_info handling with much stricter date tests
+ * added support for multiple plugin directories using $plugin_path
+ * changed plugin loading to use @INC instead of hardcoded
+ $plugin_dir
+ * added support for external config file via BLOSXOM_CONFIG_DIR
+ and/or BLOSXOM_CONFIG_FILE environment variables
+ * added support for $plugin_list plugin config file
+ * fixed several RSS and XHTML escaping issues (Closes: #1717980)
+ * made the default templates conforming to HTML 4.01
+ (Closes: #1609595)
+ * added a testsuite for blosxom
+ * added an encoding setting, defaulting to UTF-8
+ * added support for configuration files and therefore blosxom farms
+ (based on the Debian config file patch)
+ * allowed the content of the content type template to be used as
+ variable in other templates, e.g. for usage with <meta> tags.
+ * many small improvements
+ * some code refactoring (including a .perltidyrc)
+
+v2.0.2
+ * fixed path_info to have correct extension in static mode (bug
+ 1368882)
+ * fixed filtering bug in static mode (bug 1356997)
+ * changed DATA section template parsing to allow newlines for
+ greater readability, and to allow empty templates.
+ * work-around for bug in CGI::url() when using SSI
+
+v2.0.1
+ * Fixed XML escaping of RSS feeds
+ * Ignore editor backup files in the plugin directory (i.e.
+ "myplugin~")
+ * Set path_info variables correctly for all static pages.
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..5e94da9
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,15 @@
+VERSION=$(shell head -1 ChangeLog | sed -e s/v//)
+
+dist:
+ rm -rf ../blosxom-$(VERSION)/
+ mkdir ../blosxom-$(VERSION)
+ cp -priv * ../blosxom-$(VERSION)/
+ cd .. && tar cvzf blosxom-$(VERSION).tar.gz --exclude=CVS --exclude='*~' --exclude=".??*" --exclude="#*#" --exclude="*.t" blosxom-$(VERSION)/
+ rm -rf ../blosxom-$(VERSION)/
+
+test:
+ prove -v t/*.t
+
+tidycheck:
+ perltidy blosxom.cgi | diff -u blosxom.cgi -
+
diff --git a/blosxom.cgi b/blosxom.cgi
new file mode 100755
index 0000000..dcf4e2e
--- /dev/null
+++ b/blosxom.cgi
@@ -0,0 +1,1064 @@
+#!/usr/bin/perl
+
+# Blosxom
+# Author: Rael Dornfest (2002-2003), The Blosxom Development Team (2005-2024)
+# Version: 2.2.0
+# Home/Docs/Licensing: http://blosxom.sourceforge.net/
+# Development/Downloads: http://sourceforge.net/projects/blosxom
+
+package blosxom;
+
+=head1 NAME
+
+blosxom - A lightweight yet feature-packed weblog
+
+=head1 SYNOPSIS
+
+B<blosxom> is a simple web log (blog) CGI script written in perl.
+
+=head1 DESCRIPTION
+
+B<Blosxom> (pronounced "I<blossom>") is a lightweight yet feature-packed
+weblog application designed from the ground up with simplicity,
+usability, and interoperability in mind.
+
+Fundamental is its reliance upon the file system, folders and files
+as its content database. Blosxom's weblog entries are plain text
+files like any other. Write from the comfort of your favorite text
+editor and hit the Save button. Create, edit, rename, and delete entries
+on the command-line, via FTP, WebDAV, or anything else you
+might use to manipulate your files. There's no import or export; entries
+are nothing more complex than title on the first line, body being
+everything thereafter.
+
+Despite its tiny footprint, Blosxom doesn't skimp on features, sporting
+the majority of features one would find in any other Weblog application.
+
+Blosxom is simple, straightforward, minimalist Perl affording even the
+dabbler an opportunity for experimentation and customization. And
+last, but not least, Blosxom is open source and free for the taking and
+altering.
+
+=head1 USAGE
+
+Write a weblog entry, and place it into the main data directory. Place
+the the title is on the first line; the body is everything afterwards.
+For example, create a file named I<first.txt> and put in it something
+like this:
+
+ First Blosxom Post!
+
+ I have successfully installed blosxom on this system. For more
+ information on blosxom, see the author's <a
+ href="http://blosxom.sourceforge.net/">blosxom site</a>.
+
+Place the file in the directory under the I<$datadir> points to. Be
+sure to change the default location to be somewhere accessable by the
+web server that runs blosxom as a CGI program.
+
+=cut
+
+# --- Configurable variables -----
+
+# What's this blog's title?
+$blog_title = "My Weblog";
+
+# What's this blog's description (for outgoing RSS feed)?
+$blog_description = "Yet another Blosxom weblog.";
+
+# What's this blog's primary language (for outgoing RSS feed)?
+$blog_language = "en";
+
+# What's this blog's text encoding ?
+$blog_encoding = "UTF-8";
+
+# Where are this blog's entries kept?
+$datadir = "/Library/WebServer/Documents/blosxom";
+
+# What's my preferred base URL for this blog (leave blank for
+# automatic)?
+$url = "";
+
+# Should I stick only to the datadir for items or travel down the
+# directory hierarchy looking for items? If so, to what depth?
+#
+# 0 = infinite depth (aka grab everything), 1 = datadir only,
+# n = n levels down
+
+$depth = 0;
+
+# How many entries should I show on the home page?
+$num_entries = 40;
+
+# What file extension signifies a blosxom entry?
+$file_extension = "txt";
+
+# What is the default flavour?
+$default_flavour = "html";
+
+# Should I show entries from the future (i.e. dated after now)?
+$show_future_entries = 0;
+
+# Should date components of the path always be at the front?
+# If this is disabled, the date components can appear anywhere in the
+# url (but always directly after each other, in the year/month/day
+# order). For example, /category/subcategory/2008/12/ (or even
+# /category/2008/12/subcategory/) shows all posts in subcategory from
+# December 2008.
+$date_first_in_url = 0;
+
+# Should I display the date template only when the actual date changes,
+# not the date template? (Only needed if you're using conditionals
+# within your date templates)
+$date_break_on_date_string = 0;
+
+# --- Plugins (Optional) -----
+
+# File listing plugins blosxom should load (if empty blosxom will load
+# all plugins in $plugin_dir and $plugin_path directories)
+$plugin_list = "";
+
+# Where are my plugins kept?
+$plugin_dir = "";
+
+# Where should my plugins keep their state information?
+$plugin_state_dir = "$plugin_dir/state";
+
+# Additional plugins location. A list of directories, separated by ';'
+# on windows, ':' everywhere else.
+$plugin_path = "";
+
+# --- Static Rendering -----
+
+# Where are this blog's static files to be created?
+$static_dir = "/Library/WebServer/Documents/blog";
+
+# What's my administrative password (you must set this for static
+# rendering)?
+$static_password = "";
+
+# What flavours should I generate statically?
+@static_flavours = qw/html rss/;
+
+# Should I generate static date pages?
+# 0 = no, 1 = yes
+$static_date_pages = 1;
+
+# Should I statically generate individual entries?
+# 0 = no, 1 = yes
+$static_entries = 0;
+
+# --- Advanced Encoding Options -----
+
+# Should I encode entities for xml content-types? (plugins can turn
+# this off if they do it themselves)
+$encode_xml_entities = 1;
+
+# Should I encode 8 bit special characters, e.g. umlauts in URLs, e.g.
+# convert an ISO-Latin-1 \"o to %F6? (off by default for now; plugins
+# can change this, too)
+$encode_8bit_chars = 0;
+
+# RegExp matching all characters which should be URL encoded in links.
+# Defaults to anything but numbers, letters, slash, colon, dash,
+# underscore and dot.
+$url_escape_re = qr([^-/a-zA-Z0-9:._]);
+
+# --------------------------------
+
+=head1 ENVIRONMENT
+
+=over
+
+=item B<BLOSXOM_CONFIG_FILE>
+
+Points to the location of the configuration file. This will be
+considered as first option, if it's set.
+
+
+=item B<BLOSXOM_CONFIG_DIR>
+
+The here named directory will be tried unless the above mentioned
+environment variable is set and tested for a contained blosxom.conf
+file.
+
+
+=back
+
+
+=head1 FILES
+
+=over
+
+=item B</usr/lib/cgi-bin/blosxom>
+
+The CGI script itself. Please note that the location might depend on
+your installation.
+
+=item B</etc/blosxom/blosxom.conf>
+
+The default configuration file location. This is rather taken as last
+ressort if no other configuration location is set through environment
+variables.
+
+=back
+
+
+=head1 AUTHOR
+
+Rael Dornfest <rael@oreilly.com> was the original author of blosxom. The
+development was picked up by a team of dedicated users of blosxom since
+2005. See <I<http://blosxom.sourceforge.net/>> for more information.
+
+=cut
+
+use vars qw!
+ $version
+ $blog_title
+ $blog_description
+ $blog_language
+ $blog_encoding
+ $datadir
+ $url
+ %template
+ $template
+ $depth
+ $num_entries
+ $file_extension
+ $default_flavour
+ $static_or_dynamic
+ $config_dir
+ $plugin_list
+ $plugin_path
+ $plugin_dir
+ $plugin_state_dir
+ @plugins
+ %plugins
+ $static_dir
+ $static_password
+ @static_flavours
+ $static_date_pages
+ $static_entries
+ $path_info_full
+ $path_info
+ $path_info_yr
+ $path_info_mo
+ $path_info_da
+ $path_info_mo_num
+ $flavour
+ %month2num
+ @num2month
+ $interpolate
+ $entries
+ $output
+ $header
+ $show_future_entries
+ $date_first_in_url
+ %files
+ %indexes
+ %others
+ $encode_xml_entities
+ $encode_8bit_chars
+ $url_escape_re
+ $content_type
+ $date_break_on_date_string
+ !;
+
+use strict;
+use FileHandle;
+use File::Find;
+use File::stat;
+use Time::Local;
+use CGI qw/:standard :netscape/;
+
+$version = "2.2.0";
+
+# Load configuration from $ENV{BLOSXOM_CONFIG_DIR}/blosxom.conf, if it exists
+my $blosxom_config;
+if ( $ENV{BLOSXOM_CONFIG_FILE} && -r $ENV{BLOSXOM_CONFIG_FILE} ) {
+ $blosxom_config = $ENV{BLOSXOM_CONFIG_FILE};
+ ( $config_dir = $blosxom_config ) =~ s! / [^/]* $ !!x;
+}
+else {
+ for my $blosxom_config_dir ( $ENV{BLOSXOM_CONFIG_DIR},
+ '/etc/blosxom', '/etc' )
+ {
+ if ( -r "$blosxom_config_dir/blosxom.conf" ) {
+ $config_dir = $blosxom_config_dir;
+ $blosxom_config = "$blosxom_config_dir/blosxom.conf";
+ last;
+ }
+ }
+}
+
+# Load $blosxom_config
+if ($blosxom_config) {
+ if ( -r $blosxom_config ) {
+ eval { require $blosxom_config }
+ or warn "Error reading blosxom config file '$blosxom_config'"
+ . ( $@ ? ": $@" : '' );
+ }
+ else {
+ warn "Cannot find or read blosxom config file '$blosxom_config'";
+ }
+}
+
+my $fh = new FileHandle;
+
+%month2num = (
+ nil => '00',
+ Jan => '01',
+ Feb => '02',
+ Mar => '03',
+ Apr => '04',
+ May => '05',
+ Jun => '06',
+ Jul => '07',
+ Aug => '08',
+ Sep => '09',
+ Oct => '10',
+ Nov => '11',
+ Dec => '12'
+);
+@num2month = sort { $month2num{$a} <=> $month2num{$b} } keys %month2num;
+
+# Use the stated preferred URL or figure it out automatically. Set
+# $url manually in the config section above if CGI.pm doesn't guess
+# the base URL correctly, e.g. when called from a Server Side Includes
+# document or so.
+unless ($url) {
+ $url = url();
+
+ # Unescape %XX hex codes (from URI::Escape::uri_unescape)
+ $url =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg;
+
+ # Support being called from inside a SSI document
+ $url =~ s/^included:/http:/ if $ENV{SERVER_PROTOCOL} eq 'INCLUDED';
+
+ # Remove PATH_INFO if it is set but not removed by CGI.pm. This
+ # seems to happen when used with Apache's Alias directive or if
+ # called from inside a Server Side Include document. If that
+ # doesn't help either, set $url manually in the configuration.
+ $url =~ s/\Q$ENV{PATH_INFO}\E$// if defined $ENV{PATH_INFO};
+
+ # NOTE:
+ #
+ # There is one case where this code does more than necessary, too:
+ # If the URL requested is e.g. http://example.org/blog/blog and
+ # the base URL is correctly determined as http://example.org/blog
+ # by CGI.pm, then this code will incorrectly normalize the base
+ # URL down to http://example.org, because the same string as
+ # PATH_INFO is part of the base URL, too. But this is such a
+ # seldom case and can be fixed by setting $url in the config file,
+ # too.
+}
+
+# The only modification done to a manually set base URL is to strip
+# a trailing slash if present.
+
+$url =~ s!/$!!;
+
+# Drop ending any / from dir settings
+$datadir =~ s!/$!!;
+$plugin_dir =~ s!/$!!;
+$static_dir =~ s!/$!!;
+
+# Fix depth to take into account datadir's path
+$depth += ( $datadir =~ tr[/][] ) - 1 if $depth;
+
+if ( !$ENV{GATEWAY_INTERFACE}
+ and param('-password')
+ and $static_password
+ and param('-password') eq $static_password )
+{
+ $static_or_dynamic = 'static';
+}
+else {
+ $static_or_dynamic = 'dynamic';
+ param( -name => '-quiet', -value => 1 );
+}
+
+# Path Info Magic
+# Take a gander at HTTP's PATH_INFO for optional blog name, archive yr/mo/day
+my @path_info = split m{/}, path_info() || param('path');
+$path_info_full = join '/', @path_info; # Equivalent to $ENV{PATH_INFO}
+shift @path_info;
+
+# Flavour specified by ?flav={flav} or index.{flav}
+$flavour = '';
+if ( !( $flavour = param('flav') ) ) {
+ if ( $path_info[$#path_info] =~ /(.+)\.(.+)$/ ) {
+ $flavour = $2;
+ pop @path_info if $1 eq 'index';
+ }
+}
+$flavour ||= $default_flavour;
+
+# Fix XSS in flavour name (CVE-2008-2236)
+$flavour = blosxom_html_escape($flavour);
+
+sub blosxom_html_escape {
+ my $string = shift;
+ my %escape = (
+ '<' => '&lt;',
+ '>' => '&gt;',
+ '&' => '&amp;',
+ '"' => '&quot;',
+ "'" => '&apos;'
+ );
+ my $escape_re = join '|' => keys %escape;
+ $string =~ s/($escape_re)/$escape{$1}/g;
+ $string;
+}
+
+# Global variable to be used in head/foot.{flavour} templates
+$path_info = '';
+
+if ( !$date_first_in_url ) {
+ # Add all @path_info elements to $path_info till we come to one that could be a year
+ while ( $path_info[0] && $path_info[0] !~ /^(19|20)\d{2}$/ ) {
+ $path_info .= '/' . shift @path_info;
+ }
+}
+
+# Pull date elements out of path
+if ( $path_info[0] && $path_info[0] =~ /^(19|20)\d{2}$/ ) {
+ $path_info_yr = shift @path_info;
+ if ($path_info[0]
+ && ( $path_info[0] =~ /^(0\d|1[012])$/
+ || exists $month2num{ ucfirst lc $path_info_mo } )
+ )
+ {
+ $path_info_mo = shift @path_info;
+
+ # Map path_info_mo to numeric $path_info_mo_num
+ $path_info_mo_num
+ = $path_info_mo =~ /^\d{2}$/
+ ? $path_info_mo
+ : $month2num{ ucfirst lc $path_info_mo };
+ if ( $path_info[0] && $path_info[0] =~ /^[0123]\d$/ ) {
+ $path_info_da = shift @path_info;
+ }
+ }
+}
+
+# Add remaining path elements to $path_info
+$path_info .= '/' . join( '/', @path_info );
+
+# Strip spurious slashes
+$path_info =~ s!(^/*)|(/*$)!!g;
+
+# Define standard template subroutine, plugin-overridable at Plugins: Template
+$template = sub {
+ my ( $path, $chunk, $flavour ) = @_;
+
+ do {
+ return join '', <$fh>
+ if $fh->open("< $datadir/$path/$chunk.$flavour");
+ } while ( $path =~ s/(\/*[^\/]*)$// and $1 );
+
+ # Check for definedness, since flavour can be the empty string
+ if ( defined $template{$flavour}{$chunk} ) {
+ return $template{$flavour}{$chunk};
+ }
+ elsif ( defined $template{error}{$chunk} ) {
+ return $template{error}{$chunk};
+ }
+ else {
+ return '';
+ }
+};
+
+# Bring in the templates
+%template = ();
+while (<DATA>) {
+ last if /^(__END__)$/;
+ my ( $ct, $comp, $txt ) = /^(\S+)\s(\S+)(?:\s(.*))?$/ or next;
+ $txt =~ s/\\n/\n/mg;
+ $template{$ct}{$comp} .= $txt . "\n";
+}
+
+# Plugins: Start
+my $path_sep = $^O eq 'MSWin32' ? ';' : ':';
+my @plugin_dirs = split /$path_sep/, $plugin_path;
+unshift @plugin_dirs, $plugin_dir;
+my @plugin_list = ();
+my %plugin_hash = ();
+
+# If $plugin_list is set, read plugins to use from that file
+if ($plugin_list) {
+ if ( -r $plugin_list and $fh->open("< $plugin_list") ) {
+ @plugin_list = map { chomp $_; $_ } grep { /\S/ && !/^#/ } <$fh>;
+ $fh->close;
+ }
+ else {
+ warn "unable to read or open plugin_list '$plugin_list': $!";
+ $plugin_list = '';
+ }
+}
+
+# Otherwise walk @plugin_dirs to get list of plugins to use
+if ( !@plugin_list && @plugin_dirs ) {
+ for my $plugin_dir (@plugin_dirs) {
+ next unless -d $plugin_dir;
+ if ( opendir PLUGINS, $plugin_dir ) {
+ for my $plugin (
+ grep { /^[\w:]+$/ && !/~$/ && -f "$plugin_dir/$_" }
+ readdir(PLUGINS) )
+ {
+
+ # Ignore duplicates
+ next if $plugin_hash{$plugin};
+
+ # Add to @plugin_list and %plugin_hash
+ $plugin_hash{$plugin} = "$plugin_dir/$plugin";
+ push @plugin_list, $plugin;
+ }
+ closedir PLUGINS;
+ }
+ }
+ @plugin_list = sort @plugin_list;
+}
+
+# Load all plugins in @plugin_list
+unshift @INC, @plugin_dirs;
+foreach my $plugin (@plugin_list) {
+ my ( $plugin_name, $off ) = $plugin =~ /^\d*([\w:]+?)(_?)$/;
+ my $plugin_file = $plugin_list ? $plugin_name : $plugin;
+ my $on_off = $off eq '_' ? -1 : 1;
+
+ # Allow perl module plugins
+ # The -z test is a hack to allow a zero-length placeholder file in a
+ # $plugin_path directory to indicate an @INC module should be loaded
+ if ( $plugin =~ m/::/ && ( $plugin_list || -z $plugin_hash{$plugin} ) ) {
+
+ # For Blosxom::Plugin::Foo style plugins, we need to use a string require
+ eval "require $plugin_file";
+ }
+ else
+ { # we try first to load from $plugin_dir before attempting from $plugin_path
+ eval { require "$plugin_dir/$plugin_file" }
+ or eval { require $plugin_file };
+ }
+
+ if ($@) {
+ warn "error finding or loading blosxom plugin '$plugin_name': $@";
+ next;
+ }
+ if ( $plugin_name->start() and ( $plugins{$plugin_name} = $on_off ) ) {
+ push @plugins, $plugin_name;
+ }
+
+}
+shift @INC foreach @plugin_dirs;
+
+# Plugins: Template
+# Allow for the first encountered plugin::template subroutine to override the
+# default built-in template subroutine
+foreach my $plugin (@plugins) {
+ if ( $plugins{$plugin} > 0 and $plugin->can('template') ) {
+ if ( my $tmp = $plugin->template() ) {
+ $template = $tmp;
+ last;
+ }
+ }
+}
+
+# Provide backward compatibility for Blosxom < 2.0rc1 plug-ins
+sub load_template {
+ return &$template(@_);
+}
+
+# Define default entries subroutine
+$entries = sub {
+ my ( %files, %indexes, %others );
+ my $param_all = param('-all');
+ find(
+ sub {
+ my $curr_depth = $File::Find::dir =~ tr[/][];
+ return if $depth and $curr_depth > $depth;
+ return if !-r $File::Find::name;
+
+ # if a $file_extension file and not a .file or an index
+ if ( m/^([^.].*)\.$file_extension$/
+ and $1 ne 'index' )
+ {
+ my $basename_noext = $1;
+
+ # read modification time
+ my $mtime = stat($File::Find::name)->mtime or return;
+
+ # to show or not to show future entries
+ return unless ( $show_future_entries or $mtime < time );
+
+ # add the file and its associated mtime to the list of files
+ $files{$File::Find::name} = $mtime;
+
+ # static rendering bits
+ if ( $static_or_dynamic eq 'static' ) {
+ ( my $dirname = $File::Find::dir ) =~ s!^$datadir/?!!;
+ my $static_file
+ = "$static_dir/${dirname}index.$static_flavours[0]";
+ if ( $param_all
+ or !-f $static_file
+ or stat($static_file)->mtime < $mtime )
+ {
+ $indexes{$dirname} = 1;
+ if ($static_date_pages) {
+ my $d = join( '/',
+ ( nice_date($mtime) )[ 5, 2, 3 ] );
+ $indexes{$d} = $d;
+ }
+ $indexes{ ( $dirname ? "$dirname/" : '' )
+ . "$basename_noext.$file_extension" } = 1
+ if $static_entries;
+ }
+ }
+ }
+
+ # not an entries match
+ elsif ( !-d $File::Find::name ) {
+ $others{$File::Find::name} = stat($File::Find::name)->mtime;
+ }
+ },
+ $datadir
+ );
+
+ return ( \%files, \%indexes, \%others );
+};
+
+# Plugins: Entries
+# Allow for the first encountered plugin::entries subroutine to override the
+# default built-in entries subroutine
+foreach my $plugin (@plugins) {
+ if ( $plugins{$plugin} > 0 and $plugin->can('entries') ) {
+ if ( my $tmp = $plugin->entries() ) {
+ $entries = $tmp;
+ last;
+ }
+ }
+}
+
+my ( $files, $indexes, $others ) = &$entries();
+%indexes = %$indexes;
+
+# Static
+if ( $static_or_dynamic eq 'static' ) {
+
+ param('-quiet') or print "Blosxom is generating static index pages...\n";
+
+ # Home Page and Directory Indexes
+ my %done;
+ foreach my $path ( sort keys %indexes ) {
+ my $p = '';
+ foreach ( ( '', split /\//, $path ) ) {
+ $p .= "/$_";
+ $p =~ s!^/!!;
+ next if $done{$p}++;
+ mkdir "$static_dir/$p", 0755
+ unless ( -d "$static_dir/$p" or $p =~ /\.$file_extension$/ );
+ foreach $flavour (@static_flavours) {
+ $content_type
+ = ( &$template( $p, 'content_type', $flavour ) );
+ $content_type =~ s!\n.*!!s;
+ my $fn = $p =~ m!^(.+)\.$file_extension$! ? $1 : "$p/index";
+ param('-quiet') or print "$fn.$flavour\n";
+ my $fh_w = new FileHandle "> $static_dir/$fn.$flavour"
+ or die "Couldn't open $static_dir/$p for writing: $!";
+ $output = '';
+ if ( $indexes{$path} == 1 ) {
+
+ # category
+ $path_info = $p;
+
+ # individual story
+ $path_info =~ s!\.$file_extension$!\.$flavour!;
+ print $fh_w &generate( 'static', $path_info, '', $flavour,
+ $content_type );
+ }
+ else {
+
+ # date
+ local (
+ $path_info_yr, $path_info_mo,
+ $path_info_da, $path_info
+ ) = split /\//, $p, 4;
+ unless ( defined $path_info ) { $path_info = "" }
+ print $fh_w &generate( 'static', '', $p, $flavour,
+ $content_type );
+ }
+ $fh_w->close;
+ if ( -z "$static_dir/$fn.$flavour" ) {
+ unlink("$static_dir/$fn.$flavour")
+ or die "Couldn't delete empty $fn.$flavour: $!";
+ }
+ }
+ }
+ }
+}
+
+# Dynamic
+else {
+ $content_type = ( &$template( $path_info, 'content_type', $flavour ) );
+ $content_type =~ s!\n.*!!s;
+
+ $content_type =~ s/(\$\w+(?:::\w+)*)/"defined $1 ? $1 : ''"/gee;
+ $header = { -type => $content_type };
+
+ print generate( 'dynamic', $path_info,
+ "$path_info_yr/$path_info_mo_num/$path_info_da",
+ $flavour, $content_type );
+}
+
+# Plugins: End
+foreach my $plugin (@plugins) {
+ if ( $plugins{$plugin} > 0 and $plugin->can('end') ) {
+ $plugin->end();
+ }
+}
+
+# Generate
+sub generate {
+ my ( $static_or_dynamic, $currentdir, $date_str, $flavour, $content_type )
+ = @_;
+
+ %files = %$files;
+ %others = ref $others ? %$others : ();
+
+ # Plugins: Filter
+ foreach my $plugin (@plugins) {
+ if ( $plugins{$plugin} > 0 and $plugin->can('filter') ) {
+ $plugin->filter( \%files, \%others );
+ }
+ }
+
+ my %f = %files;
+
+ # Plugins: Skip
+ # Allow plugins to decide if we can cut short story generation
+ my $skip;
+ foreach my $plugin (@plugins) {
+ if ( $plugins{$plugin} > 0 and $plugin->can('skip') ) {
+ last if $skip = $plugin->skip();
+ }
+ }
+
+ unless ($skip) {
+
+ # Define default interpolation subroutine
+ $interpolate = sub {
+
+ package blosxom;
+ my $template = shift;
+
+ # Interpolate scalars, namespaced scalars, and hash/hashref scalars
+ $template
+ =~ s/(\$\w+(?:::\w+)*(?:(?:->)?{([\'\"]?)[-\w]+\2})?)/"defined $1 ? $1 : ''"/gee;
+ return $template;
+ };
+
+ # Plugins: Interpolate
+ # Allow for the first encountered plugin::interpolate subroutine to
+ # override the default built-in interpolate subroutine
+ foreach my $plugin (@plugins) {
+ if ( $plugins{$plugin} > 0 and $plugin->can('interpolate') ) {
+ if ( my $tmp = $plugin->interpolate() ) {
+ $interpolate = $tmp;
+ last;
+ }
+ }
+ }
+
+ # Head
+ my $head = ( &$template( $currentdir, 'head', $flavour ) );
+
+ # Plugins: Head
+ foreach my $plugin (@plugins) {
+ if ( $plugins{$plugin} > 0 and $plugin->can('head') ) {
+ $plugin->head( $currentdir, \$head );
+ }
+ }
+
+ $head = &$interpolate($head);
+
+ $output .= $head;
+
+ if ( $currentdir =~ /(.*?)([^\/]+)\.(.+)$/ and $2 ne 'index' ) {
+ $currentdir = "$1$2.$file_extension";
+ %f = ( "$datadir/$currentdir" => $files{"$datadir/$currentdir"} )
+ if $files{"$datadir/$currentdir"};
+ }
+ else {
+ $currentdir =~ s! /index\..+$ !!x;
+ }
+
+ # Define a default sort subroutine
+ my $sort = sub {
+ my ($files_ref) = @_;
+ return sort { $files_ref->{$b} <=> $files_ref->{$a} }
+ keys %$files_ref;
+ };
+
+ # Plugins: Sort
+ # Allow for the first encountered plugin::sort subroutine
+ # to override the default built-in sort subroutine
+ foreach my $plugin (@plugins) {
+ if ( $plugins{$plugin} > 0 and $plugin->can('sort') ) {
+ if ( my $tmp = $plugin->sort() ) {
+ $sort = $tmp;
+ last;
+ }
+ }
+ }
+
+ # Stories
+ my $curdate = '';
+ my $ne = $num_entries;
+ foreach my $path_file ( &$sort( \%f, \%others ) ) {
+ last if $ne <= 0 && $date_str !~ /\d/;
+ use vars qw/ $path $fn /;
+ ( $path, $fn )
+ = $path_file =~ m!^$datadir/(?:(.*)/)?(.*)\.$file_extension!;
+
+ # Only stories in the right hierarchy
+ $path =~ /^$currentdir/
+ or $path_file eq "$datadir/$currentdir"
+ or next;
+
+ # Prepend a slash for use in templates only if a path exists
+ $path &&= "/$path";
+
+ # Date fiddling for by-{year,month,day} archive views
+ use vars
+ qw/ $dw $mo $mo_num $da $ti $yr $hr $min $hr12 $ampm $utc_offset/;
+ ( $dw, $mo, $mo_num, $da, $ti, $yr, $utc_offset )
+ = nice_date( $files{"$path_file"} );
+ ( $hr, $min ) = split /:/, $ti;
+ ( $hr12, $ampm ) = $hr >= 12 ? ( $hr - 12, 'pm' ) : ( $hr, 'am' );
+ $hr12 =~ s/^0//;
+ if ( $hr12 == 0 ) { $hr12 = 12 }
+
+ # Only stories from the right date
+ my ( $path_info_yr, $path_info_mo_num, $path_info_da )
+ = split /\//, $date_str;
+ next if $path_info_yr && $yr != $path_info_yr;
+ last if $path_info_yr && $yr < $path_info_yr;
+ next if $path_info_mo_num && $mo ne $num2month[$path_info_mo_num];
+ next if $path_info_da && $da != $path_info_da;
+ last if $path_info_da && $da < $path_info_da;
+
+ # Date
+ my $date = ( &$template( $path, 'date', $flavour ) );
+
+ # Plugins: Date
+ foreach my $plugin (@plugins) {
+ if ( $plugins{$plugin} > 0 and $plugin->can('date') ) {
+ $plugin->date( $currentdir, \$date, $files{$path_file},
+ $dw, $mo, $mo_num, $da, $ti, $yr );
+ }
+ }
+
+ $date = &$interpolate($date);
+
+ # Traditionally blosxom displays the date whenever the date
+ # template output changes. If you want to have conditionals
+ # in your date template so the output can change without the
+ # date changing, set $date_break_on_date_string to true.
+ if ( !$date_break_on_date_string ) {
+ if ( $date && $curdate ne $date ) {
+ $curdate = $date;
+ $output .= $date;
+ }
+ }
+ else {
+ if ( $date && $curdate ne "$yr/$mo_num/$da" ) {
+ $curdate = "$yr/$mo_num/$da";
+ $output .= $date;
+ }
+ }
+
+ use vars qw/ $title $body $raw /;
+ if ( -f "$path_file" && $fh->open("< $path_file") ) {
+ chomp( $title = <$fh> );
+ chomp( $body = join '', <$fh> );
+ $fh->close;
+ $raw = "$title\n$body";
+ }
+ my $story = ( &$template( $path, 'story', $flavour ) );
+
+ # Plugins: Story
+ foreach my $plugin (@plugins) {
+ if ( $plugins{$plugin} > 0 and $plugin->can('story') ) {
+ $plugin->story( $path, $fn, \$story, \$title, \$body );
+ }
+ }
+
+ # Save unescaped versions and allow them to be used in
+ # flavour templates.
+ use vars qw/$url_unesc $path_unesc $fn_unesc/;
+ $url_unesc = $url;
+ $path_unesc = $path;
+ $fn_unesc = $fn;
+
+ # Fix special characters in links inside XML content
+ if ( $encode_xml_entities
+ && $content_type =~ m{\bxml\b}
+ && $content_type !~ m{\bxhtml\b} )
+ {
+
+ # Escape special characters inside the <link> container
+
+ &url_escape_url_path_and_fn();
+
+ # Escape <, >, and &, and to produce valid RSS
+ $title = blosxom_html_escape($title);
+ $body = blosxom_html_escape($body);
+ $url = blosxom_html_escape($url);
+ $path = blosxom_html_escape($path);
+ $fn = blosxom_html_escape($fn);
+ }
+
+ # Fix special characters in links inside XML content
+ if ($encode_8bit_chars) {
+ &url_escape_url_path_and_fn();
+ }
+
+ $story = &$interpolate($story);
+
+ $output .= $story;
+ $fh->close;
+
+ $ne--;
+ }
+
+ # Foot
+ my $foot = ( &$template( $currentdir, 'foot', $flavour ) );
+
+ # Plugins: Foot
+ foreach my $plugin (@plugins) {
+ if ( $plugins{$plugin} > 0 and $plugin->can('foot') ) {
+ $plugin->foot( $currentdir, \$foot );
+ }
+ }
+
+ $foot = &$interpolate($foot);
+ $output .= $foot;
+
+ # Plugins: Last
+ foreach my $plugin (@plugins) {
+ if ( $plugins{$plugin} > 0 and $plugin->can('last') ) {
+ $plugin->last();
+ }
+ }
+
+ } # End skip
+
+ # Finally, add the header, if any and running dynamically
+ $output = header($header) . $output
+ if ( $static_or_dynamic eq 'dynamic' and $header );
+
+ $output;
+}
+
+sub nice_date {
+ my ($unixtime) = @_;
+
+ my $c_time = CORE::localtime($unixtime);
+ my ( $dw, $mo, $da, $hr, $min, $sec, $yr )
+ = ( $c_time
+ =~ /(\w{3}) +(\w{3}) +(\d{1,2}) +(\d{2}):(\d{2}):(\d{2}) +(\d{4})$/
+ );
+ $ti = "$hr:$min";
+ $da = sprintf( "%02d", $da );
+ my $mo_num = $month2num{$mo};
+
+ my $offset
+ = timegm( $sec, $min, $hr, $da, $mo_num - 1, $yr - 1900 ) - $unixtime;
+ my $utc_offset = sprintf( "%+03d", int( $offset / 3600 ) )
+ . sprintf( "%02d", ( $offset % 3600 ) / 60 );
+
+ return ( $dw, $mo, $mo_num, $da, $ti, $yr, $utc_offset );
+}
+
+sub url_escape_url_path_and_fn {
+ $url =~ s($url_escape_re)(sprintf('%%%02X', ord($&)))eg;
+ $path =~ s($url_escape_re)(sprintf('%%%02X', ord($&)))eg;
+ $fn =~ s($url_escape_re)(sprintf('%%%02X', ord($&)))eg;
+}
+
+# Default HTML and RSS template bits
+__DATA__
+html content_type text/html; charset=$blog_encoding
+
+html head <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+html head <html>
+html head <head>
+html head <meta http-equiv="content-type" content="$content_type" >
+html head <link rel="alternate" type="application/rss+xml" title="RSS" href="$url/index.rss" >
+html head <title>$blog_title $path_info_da $path_info_mo $path_info_yr</title>
+html head </head>
+html head <body>
+html head <div align="center">
+html head <h1>$blog_title</h1>
+html head <p>$path_info_da $path_info_mo $path_info_yr</p>
+html head </div>
+
+html story <div>
+html story <h3><a name="$fn">$title</a></h3>
+html story <div>$body</div>
+html story <p>posted at: $ti | path: <a href="$url$path">$path</a> | <a href="$url/$yr/$mo_num/$da#$fn">permanent link to this entry</a></p>
+html story </div>
+
+html date <h2>$dw, $da $mo $yr</h2>
+
+html foot
+html foot <div align="center">
+html foot <a href="http://blosxom.sourceforge.net/"><img src="http://blosxom.sourceforge.net/images/pb_blosxom.gif" alt="powered by blosxom" border="0" width="90" height="33" ></a>
+html foot </div>
+html foot </body>
+html foot </html>
+
+rss content_type text/xml; charset=$blog_encoding
+
+rss head <?xml version="1.0" encoding="$blog_encoding"?>
+rss head <rss version="2.0">
+rss head <channel>
+rss head <title>$blog_title</title>
+rss head <link>$url/$path_info</link>
+rss head <description>$blog_description</description>
+rss head <language>$blog_language</language>
+rss head <docs>http://blogs.law.harvard.edu/tech/rss</docs>
+rss head <generator>blosxom/$version</generator>
+
+rss story <item>
+rss story <title>$title</title>
+rss story <pubDate>$dw, $da $mo $yr $ti:00 $utc_offset</pubDate>
+rss story <link>$url/$yr/$mo_num/$da#$fn</link>
+rss story <category>$path</category>
+rss story <guid isPermaLink="false">$url$path/$fn</guid>
+rss story <description>$body</description>
+rss story </item>
+
+rss date
+
+rss foot </channel>
+rss foot </rss>
+
+error content_type text/html
+
+error head <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+error head <html>
+error head <head><title>Error: unknown Blosxom flavour "$flavour"</title></head>
+error head <body>
+error head <h1><font color="red">Error: unknown Blosxom flavour "$flavour"</font></h1>
+error head <p>I'm afraid this is the first I've heard of a "$flavour" flavoured Blosxom. Try dropping the "/+$flavour" bit from the end of the URL.</p>
+
+error story <h3>$title</h3>
+error story <div>$body</div> <p><a href="$url/$yr/$mo_num/$da#fn.$default_flavour">#</a></p>
+
+error date <h2>$dw, $da $mo $yr</h2>
+
+error foot </body>
+error foot </html>
+__END__
+
diff --git a/t/01_templates.t b/t/01_templates.t
new file mode 120000
index 0000000..e42f284
--- /dev/null
+++ b/t/01_templates.t
@@ -0,0 +1 @@
+driver \ No newline at end of file
diff --git a/t/02_smoketest.t b/t/02_smoketest.t
new file mode 120000
index 0000000..e42f284
--- /dev/null
+++ b/t/02_smoketest.t
@@ -0,0 +1 @@
+driver \ No newline at end of file
diff --git a/t/03_interpolate.t b/t/03_interpolate.t
new file mode 120000
index 0000000..e42f284
--- /dev/null
+++ b/t/03_interpolate.t
@@ -0,0 +1 @@
+driver \ No newline at end of file
diff --git a/t/03_permalinks.t b/t/03_permalinks.t
new file mode 120000
index 0000000..e42f284
--- /dev/null
+++ b/t/03_permalinks.t
@@ -0,0 +1 @@
+driver \ No newline at end of file
diff --git a/t/04_plugin_dir.t b/t/04_plugin_dir.t
new file mode 120000
index 0000000..e42f284
--- /dev/null
+++ b/t/04_plugin_dir.t
@@ -0,0 +1 @@
+driver \ No newline at end of file
diff --git a/t/04_plugin_list.t b/t/04_plugin_list.t
new file mode 120000
index 0000000..e42f284
--- /dev/null
+++ b/t/04_plugin_list.t
@@ -0,0 +1 @@
+driver \ No newline at end of file
diff --git a/t/08_static_basic.t b/t/08_static_basic.t
new file mode 120000
index 0000000..e42f284
--- /dev/null
+++ b/t/08_static_basic.t
@@ -0,0 +1 @@
+driver \ No newline at end of file
diff --git a/t/09_static_configure.t b/t/09_static_configure.t
new file mode 120000
index 0000000..e42f284
--- /dev/null
+++ b/t/09_static_configure.t
@@ -0,0 +1 @@
+driver \ No newline at end of file
diff --git a/t/Makefile b/t/Makefile
new file mode 100644
index 0000000..b3faf8f
--- /dev/null
+++ b/t/Makefile
@@ -0,0 +1,6 @@
+
+all: test
+
+test:
+ prove -v *.t
+
diff --git a/t/README b/t/README
new file mode 100644
index 0000000..e8fdbdb
--- /dev/null
+++ b/t/README
@@ -0,0 +1,78 @@
+Running Tests
+=============
+
+ prove *.t
+
+
+
+Test Layout
+===========
+
+To add a new test, you want to add two things - a test script (which
+is typically just a symlink to the main 'driver' script), and a test
+directory. To add a new test directory, you're probably best just to
+copy one of the existing ones - 'templates' is a good choice:
+
+ cp -rp templates newtest
+
+Test directory layout is as follows, using 'templates' as an example:
+
+ templates
+ |-- config
+ | `-- blosxom.conf
+ |-- data
+ | |-- 1.txt
+ | |-- 1.txt.200607192254
+ | |-- content_type.html
+ | |-- date.html
+ | |-- foot.html
+ | |-- head.html
+ | `-- story.html
+ |-- expected.html
+ `-- spec.yaml
+
+The 'config' directory contains the config files for this blosxom
+instance, which is minimally a 'blosxom.conf' file with the $data_dir
+variable pointing to the 'data' directory. Customising this is
+optional.
+
+The 'data directory' is the set of stories or posts you want to use
+for your test, and any flavour files you want. Stories may optionally be
+suffixed with a numeric timestamp (format YYYYMMDDHHMI) like the
+'1.txt.200607192254' entry above, which is used to set the modify time
+of the story explicitly (since CVS does not store mtimes). Providing
+flavour files is recommended so that your tests don't break if the
+default flavours change.
+
+At the top level of the test directory are a set of one or more
+expected output files, and the spec.yaml files which controls the set
+of tests that are run. For templates, the spec.yaml looks like this:
+
+ tests:
+ -
+ - ""
+ - expected.html
+
+This lists the set of tests to be run (in this case just a single test).
+Each test requires a list of two arguments - the arguments to path to
+blosxom.cgi (in this case none, an empty string), and a file containing
+the expected output. So this test will execute blosxom.cgi with no
+arguments, and compare the output produced against that contained in
+the 'expected.html' file.
+
+A longer spec.yaml example is:
+
+ tests:
+ -
+ - ""
+ - expected.html
+ -
+ - path=/foo
+ - expected.html
+ -
+ - path=/foo/bar.html
+ - expected.bar
+
+This defines three tests, one with no arguments, one with a path of
+/foo, and a third with a path of /foo/bar.html.
+
diff --git a/t/driver b/t/driver
new file mode 100644
index 0000000..00ab8b0
--- /dev/null
+++ b/t/driver
@@ -0,0 +1,144 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Test::More qw( no_plan );
+
+use Cwd;
+use YAML;
+use IO::File;
+use File::Find;
+use File::Copy;
+#use File::Touch;
+use File::Basename;
+use Test::Differences;
+
+my $test = basename($0);
+$test =~ s/^\d+_?//;
+$test =~ s/\.t$//;
+
+my $testdir = $test;
+$testdir = "t/$testdir" if -d "t/$testdir";
+$testdir = cwd . "/$testdir";
+die "cannot find root '$testdir'" unless -d $testdir;
+
+my $blosxom_config_dir = "$testdir/config";
+die "cannot find blosxom config dir '$blosxom_config_dir'" unless -d $blosxom_config_dir;
+$ENV{BLOSXOM_CONFIG_DIR} = $blosxom_config_dir;
+$ENV{TZ} = 'UTC';
+
+my $blosxom_cgi = $ENV{BLOSXOM_CGI};
+unless ($blosxom_cgi && -f $blosxom_cgi) {
+ if (-f "$testdir/../../blosxom.cgi") {
+ $blosxom_cgi = "$testdir/../../blosxom.cgi";
+ warn "ignoring BLOSXOM_CGI setting '$ENV{BLOSXOM_CGI}' - using '$blosxom_cgi' instead"
+ if $ENV{BLOSXOM_CGI};
+ }
+ elsif ($blosxom_cgi) {
+ die "cannot find blosxom.cgi '$blosxom_cgi' - check your BLOSXOM_CGI environment variable";
+ }
+ else {
+ die "cannot find blosxom.cgi - please set the BLOSXOM_CGI environment variable";
+ }
+}
+die "blosxom.cgi '$blosxom_cgi' is not executable" unless -x $blosxom_cgi;
+
+my $spec = YAML::LoadFile ("$testdir/spec.yaml")
+ or die("$test - could not load spec");
+
+touch_files("$testdir/data");
+
+# Eval blosxom.conf
+my ($static_dir, $static_password, @static_flavours);
+if (my $fh = IO::File->new("$blosxom_config_dir/blosxom.conf", 'r')) {
+ no strict;
+ local $/ = undef;
+ eval <$fh>;
+}
+
+# Static mode
+if ($static_password) {
+ eval {
+ require File::DirCompare;
+ require File::Remove;
+ };
+ SKIP: {
+ skip "Static tests require additional modules: $@", 1 if $@;
+ my $expected = $spec->{expected};
+ skip "Static tests require 'expected' directory", 1 unless $expected;
+ $expected = "$blosxom_config_dir/../$expected" unless $expected =~ m!^/!;
+ skip "Static tests 'expected' directory is missing", 1 unless -d $expected;
+ -d $static_dir or mkdir $static_dir
+ or die "mkdir on static_dir '$static_dir' failed: $!";
+
+ File::Remove::remove(\1, "$static_dir/*");
+
+ my $errors = qx($blosxom_cgi -quiet=1 -password=$static_password);
+ is($errors, '', 'no errors reported from static run');
+ File::DirCompare->compare($static_dir, "$blosxom_config_dir/../" . $spec->{expected}, sub {
+ my ($a, $b) = @_;
+ my ($a_short, $b_short) = ($a, $b);
+ $a_short =~ s!^.*\.\./!! if $a_short;
+ $b_short =~ s!^.*\.\./!! if $b_short;
+ return if $b && ($b =~ m! /CVS$ !x || $b =~ /\/\./);
+ if (! $b) {
+ fail("$a_short has no corresponding file");
+ } elsif (! $a) {
+ fail("$b_short has no corresponding file");
+ } else {
+ my ($got, $expected) = ('', '');
+ my $fh = IO::File->new($a, 'r')
+ or die "cannot open static output file '$a': $!";
+ {
+ local $/ = undef;
+ $got = <$fh>;
+ $fh->close;
+ }
+ $fh = IO::File->new($b, 'r')
+ or die "cannot open static output file '$b': $!";
+ {
+ local $/ = undef;
+ $expected = <$fh>;
+ $fh->close;
+ }
+ eq_or_diff($got, $expected, "file $a_short and $b_short match", { style => 'Unified' });
+ }
+ }, { ignore_cmp => 1 });
+
+ # Cleanup static output
+ File::Remove::remove(\1, "$static_dir/*") unless $ENV{BLOSXOM_STATIC_NO_CLEANUP};
+ }
+}
+
+# Dynamic mode
+else {
+ my %expected = ();
+ for (@{$spec->{tests}}) {
+ my ($args, $output) = @$_;
+
+ unless ($expected{$output}) {
+ my $fh = IO::File->new("$testdir/$output", 'r')
+ or die "cannot open expected output file '$output': $!";
+ {
+ local $/ = undef;
+ $expected{$output} = <$fh>;
+ }
+ $fh->close;
+ }
+
+ my $got = qx($blosxom_cgi $args);
+
+ eq_or_diff($got, $expected{$output}, "$test - got expected output for args [$args]", { style => 'Unified' });
+ }
+}
+
+sub touch_files {
+ find( sub {
+ if (/^(.*)\.(\d+)$/) {
+ copy($_, $1);
+ `touch -t $2 $1`;
+ }
+ },
+ shift );
+}
diff --git a/t/interpolate/config/blosxom.conf b/t/interpolate/config/blosxom.conf
new file mode 100644
index 0000000..9daf90f
--- /dev/null
+++ b/t/interpolate/config/blosxom.conf
@@ -0,0 +1,29 @@
+$blog_title = 'Interpolation Testing';
+$blog_description = 'Terpolation Turpentine';
+$datadir = "$ENV{BLOSXOM_CONFIG_DIR}/../data";
+use vars qw(%hash $hashref $hash);
+%hash = (
+ abc => 123,
+ def => 456,
+ 'X-Factor' => 789,
+);
+$hashref = {
+ abc => 123,
+ def => 456,
+ 'X-Factor' => 789,
+};
+$Blosxom::Test::string = 'this is a test';
+%Blosxom::Test::hash = (
+ abc => 123,
+ def => 456,
+ 'X-Factor' => 789,
+);
+$Blosxom::Test::hashref = {
+ abc => 123,
+ def => 456,
+ 'X-Factor' => 789,
+};
+# Silence $hash warnings
+$hash = '';
+
+1;
diff --git a/t/interpolate/data/content_type.html b/t/interpolate/data/content_type.html
new file mode 100644
index 0000000..e81f92a
--- /dev/null
+++ b/t/interpolate/data/content_type.html
@@ -0,0 +1 @@
+text/xhtml; charset=UTF-8
diff --git a/t/interpolate/data/date.html b/t/interpolate/data/date.html
new file mode 100644
index 0000000..2cdf76d
--- /dev/null
+++ b/t/interpolate/data/date.html
@@ -0,0 +1 @@
+ <h3>$yr-$mo_num-$da</h3>
diff --git a/t/interpolate/data/foot.html b/t/interpolate/data/foot.html
new file mode 100644
index 0000000..308b1d0
--- /dev/null
+++ b/t/interpolate/data/foot.html
@@ -0,0 +1,2 @@
+</body>
+</html>
diff --git a/t/interpolate/data/head.html b/t/interpolate/data/head.html
new file mode 100644
index 0000000..3984681
--- /dev/null
+++ b/t/interpolate/data/head.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+</head>
+<body>
+<pre>
+# Basic scalars
+title: $blog_title
+description: $blosxom::blog_description
+# Namespaced scalars
+Blosxom::Test::string: $Blosxom::Test::string
+# Hash values
+hash{abc}: $hash{abc}
+hash{'X-Factor'}: $hash{'X-Factor'}
+blosxom::hash{def}: $blosxom::hash{def}
+blosxom::hash{"X-Factor"}: $blosxom::hash{"X-Factor"}
+hashref->{abc}: $hashref->{abc}
+blosxom::hashref->{def}: $blosxom::hashref->{def}
+Blosxom::Test::hash{abc}: $Blosxom::Test::hash{abc}
+Blosxom::Test::hash{'X-Factor'}: $Blosxom::Test::hash{'X-Factor'}
+Blosxom::Test::hashref->{def}: $Blosxom::Test::hashref->{def}
+Blosxom::Test::hashref->{"X-Factor"}: $Blosxom::Test::hashref->{"X-Factor"}
+# Bad quoting with hash values
+hash{'X-Factor}: $hash{'X-Factor}
+hash{X-Factor'}: $hash{X-Factor'}
+hash{"X-Factor'}: $hash{"X-Factor'}
+</pre>
diff --git a/t/interpolate/data/story.html b/t/interpolate/data/story.html
new file mode 100644
index 0000000..7f3d068
--- /dev/null
+++ b/t/interpolate/data/story.html
@@ -0,0 +1,3 @@
+ <h4><a name="$fn">$title</a></h4>
+ <div>$body</div>
+ <p>posted at: $ti | path: <a href="$url$path">$path </a> | <a href="$url/$yr/$mo_num/$da#$fn">permanent link to this entry</a></p>
diff --git a/t/interpolate/expected.html b/t/interpolate/expected.html
new file mode 100644
index 0000000..f9c8598
--- /dev/null
+++ b/t/interpolate/expected.html
@@ -0,0 +1,32 @@
+Content-Type: text/xhtml; charset=UTF-8
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+</head>
+<body>
+<pre>
+# Basic scalars
+title: Interpolation Testing
+description: Terpolation Turpentine
+# Namespaced scalars
+Blosxom::Test::string: this is a test
+# Hash values
+hash{abc}: 123
+hash{'X-Factor'}: 789
+blosxom::hash{def}: 456
+blosxom::hash{"X-Factor"}: 789
+hashref->{abc}: 123
+blosxom::hashref->{def}: 456
+Blosxom::Test::hash{abc}: 123
+Blosxom::Test::hash{'X-Factor'}: 789
+Blosxom::Test::hashref->{def}: 456
+Blosxom::Test::hashref->{"X-Factor"}: 789
+# Bad quoting with hash values
+hash{'X-Factor}: {'X-Factor}
+hash{X-Factor'}: {X-Factor'}
+hash{"X-Factor'}: {"X-Factor'}
+</pre>
+</body>
+</html>
diff --git a/t/interpolate/spec.yaml b/t/interpolate/spec.yaml
new file mode 100644
index 0000000..93883d3
--- /dev/null
+++ b/t/interpolate/spec.yaml
@@ -0,0 +1,4 @@
+tests:
+ -
+ - ""
+ - expected.html
diff --git a/t/permalinks/config/blosxom.conf b/t/permalinks/config/blosxom.conf
new file mode 100644
index 0000000..334ecc2
--- /dev/null
+++ b/t/permalinks/config/blosxom.conf
@@ -0,0 +1,2 @@
+$datadir = "$ENV{BLOSXOM_CONFIG_DIR}/../data";
+$blog_encoding = 'ISO-8859-1';
diff --git a/t/permalinks/data/foo/bar.txt b/t/permalinks/data/foo/bar.txt
new file mode 100644
index 0000000..1e06cbd
--- /dev/null
+++ b/t/permalinks/data/foo/bar.txt
@@ -0,0 +1,4 @@
+Lorem ipsum
+Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
diff --git a/t/permalinks/data/foo/bar.txt.200607251102 b/t/permalinks/data/foo/bar.txt.200607251102
new file mode 100644
index 0000000..1e06cbd
--- /dev/null
+++ b/t/permalinks/data/foo/bar.txt.200607251102
@@ -0,0 +1,4 @@
+Lorem ipsum
+Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
diff --git a/t/permalinks/data/foo/baz.txt b/t/permalinks/data/foo/baz.txt
new file mode 100644
index 0000000..f946d24
--- /dev/null
+++ b/t/permalinks/data/foo/baz.txt
@@ -0,0 +1,8 @@
+Lorem ipso
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.Lorem ipso foer tyr wuz de ramas cora dola tym
+ipso hor tyr wuz de ramas cora dola tymon ipso foer tyr wuz de ramas
+cora dola tymo. Lorem ipso hoccer foer tyr wuz de ras cora dola tymon
+ipso hoc cer fuz de ramas cora dola tymon ipso hoccer. Lorem ipso foer
+tyr wuz de ramas cora dola tym ipso hor.
diff --git a/t/permalinks/data/foo/baz.txt.200607251103 b/t/permalinks/data/foo/baz.txt.200607251103
new file mode 100644
index 0000000..f946d24
--- /dev/null
+++ b/t/permalinks/data/foo/baz.txt.200607251103
@@ -0,0 +1,8 @@
+Lorem ipso
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.Lorem ipso foer tyr wuz de ramas cora dola tym
+ipso hor tyr wuz de ramas cora dola tymon ipso foer tyr wuz de ramas
+cora dola tymo. Lorem ipso hoccer foer tyr wuz de ras cora dola tymon
+ipso hoc cer fuz de ramas cora dola tymon ipso hoccer. Lorem ipso foer
+tyr wuz de ramas cora dola tym ipso hor.
diff --git a/t/permalinks/expected.bar b/t/permalinks/expected.bar
new file mode 100644
index 0000000..902f0e4
--- /dev/null
+++ b/t/permalinks/expected.bar
@@ -0,0 +1,28 @@
+Content-Type: text/html; charset=ISO-8859-1
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" >
+ <link rel="alternate" type="application/rss+xml" title="RSS" href="http://localhost/index.rss" >
+ <title>My Weblog </title>
+ </head>
+ <body>
+ <div align="center">
+ <h1>My Weblog</h1>
+ <p> </p>
+ </div>
+ <h2>Tue, 25 Jul 2006</h2>
+ <div>
+ <h3><a name="bar">Lorem ipsum</a></h3>
+ <div>Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto. </div>
+ <p>posted at: 11:02 | path: <a href="http://localhost/foo">/foo</a> | <a href="http://localhost/2006/07/25#bar">permanent link to this entry</a></p>
+ </div>
+
+ <div align="center">
+ <a href="http://blosxom.sourceforge.net/"><img src="http://blosxom.sourceforge.net/images/pb_blosxom.gif" alt="powered by blosxom" border="0" width="90" height="33" ></a>
+ </div>
+ </body>
+</html>
diff --git a/t/permalinks/expected.html b/t/permalinks/expected.html
new file mode 100644
index 0000000..f3e3a5a
--- /dev/null
+++ b/t/permalinks/expected.html
@@ -0,0 +1,39 @@
+Content-Type: text/html; charset=ISO-8859-1
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" >
+ <link rel="alternate" type="application/rss+xml" title="RSS" href="http://localhost/index.rss" >
+ <title>My Weblog </title>
+ </head>
+ <body>
+ <div align="center">
+ <h1>My Weblog</h1>
+ <p> </p>
+ </div>
+ <h2>Tue, 25 Jul 2006</h2>
+ <div>
+ <h3><a name="baz">Lorem ipso</a></h3>
+ <div>Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.Lorem ipso foer tyr wuz de ramas cora dola tym
+ipso hor tyr wuz de ramas cora dola tymon ipso foer tyr wuz de ramas
+cora dola tymo. Lorem ipso hoccer foer tyr wuz de ras cora dola tymon
+ipso hoc cer fuz de ramas cora dola tymon ipso hoccer. Lorem ipso foer
+tyr wuz de ramas cora dola tym ipso hor.</div>
+ <p>posted at: 11:03 | path: <a href="http://localhost/foo">/foo</a> | <a href="http://localhost/2006/07/25#baz">permanent link to this entry</a></p>
+ </div>
+ <div>
+ <h3><a name="bar">Lorem ipsum</a></h3>
+ <div>Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto. </div>
+ <p>posted at: 11:02 | path: <a href="http://localhost/foo">/foo</a> | <a href="http://localhost/2006/07/25#bar">permanent link to this entry</a></p>
+ </div>
+
+ <div align="center">
+ <a href="http://blosxom.sourceforge.net/"><img src="http://blosxom.sourceforge.net/images/pb_blosxom.gif" alt="powered by blosxom" border="0" width="90" height="33" ></a>
+ </div>
+ </body>
+</html>
diff --git a/t/permalinks/expected.rss b/t/permalinks/expected.rss
new file mode 100644
index 0000000..78e043a
--- /dev/null
+++ b/t/permalinks/expected.rss
@@ -0,0 +1,34 @@
+Content-Type: text/xml; charset=ISO-8859-1
+
+<?xml version="1.0"?>
+<!-- name="generator" content="blosxom/2.1.0" -->
+<!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN" "http://my.netscape.com/publish/formats/rss-0.91.dtd">
+
+<rss version="0.91">
+ <channel>
+ <title>My Weblog </title>
+ <link>http://localhost</link>
+ <description>Yet another Blosxom weblog.</description>
+ <language>en</language>
+
+ <item>
+ <title>Lorem ipsum</title>
+ <link>http://localhost/2006/07/19#1</link>
+ <description>Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+facto.Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet
+ipso facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor
+sit amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.Lorem ipso foer tyr wuz de ramas cora dola tym
+ipso hor tyr wuz de ramas cora dola tymon ipso foer tyr wuz de ramas
+cora dola tymo. Lorem ipso hoccer foer tyr wuz de ras cora dola tymon
+ipso hoc cer fuz de ramas cora dola tymon ipso hoccer. Lorem ipso foer
+tyr wuz de ramas cora dola tym ipso hor.</description>
+ </item>
+ </channel>
+</rss>
diff --git a/t/permalinks/spec.yaml b/t/permalinks/spec.yaml
new file mode 100644
index 0000000..bec01ec
--- /dev/null
+++ b/t/permalinks/spec.yaml
@@ -0,0 +1,18 @@
+tests:
+ -
+ - ""
+ - expected.html
+ -
+ - path=/foo
+ - expected.html
+# GC: the following test fails because $path_info = test#bar, but via CGI the
+# #bar is stripped by the CGI module. So I'm not sure what this is testing.
+# -
+# - path=/foo#bar
+# - expected.html
+ -
+ - path=/foo/bar.html
+ - expected.bar
+# -
+# - path=/2006/07/25/bar.html
+# - expected.bar
diff --git a/t/plugin_dir/README b/t/plugin_dir/README
new file mode 100644
index 0000000..24b3602
--- /dev/null
+++ b/t/plugin_dir/README
@@ -0,0 +1 @@
+Testing plugin loading via walking the standard $plugin_dir
diff --git a/t/plugin_dir/config/blosxom.conf b/t/plugin_dir/config/blosxom.conf
new file mode 100644
index 0000000..679a892
--- /dev/null
+++ b/t/plugin_dir/config/blosxom.conf
@@ -0,0 +1,5 @@
+$blog_title = 'plugin_list test';
+$blog_encoding = 'ISO-8859-1';
+$datadir = "$ENV{BLOSXOM_CONFIG_DIR}/../data";
+$plugin_list = '';
+$plugin_dir = "$ENV{BLOSXOM_CONFIG_DIR}/../plugins";
diff --git a/t/plugin_dir/data/1.txt b/t/plugin_dir/data/1.txt
new file mode 100644
index 0000000..748c525
--- /dev/null
+++ b/t/plugin_dir/data/1.txt
@@ -0,0 +1,4 @@
+Story 1
+
+Story 1 text
+
diff --git a/t/plugin_dir/data/date.html b/t/plugin_dir/data/date.html
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/t/plugin_dir/data/date.html
@@ -0,0 +1 @@
+
diff --git a/t/plugin_dir/data/foot.html b/t/plugin_dir/data/foot.html
new file mode 100644
index 0000000..308b1d0
--- /dev/null
+++ b/t/plugin_dir/data/foot.html
@@ -0,0 +1,2 @@
+</body>
+</html>
diff --git a/t/plugin_dir/data/head.html b/t/plugin_dir/data/head.html
new file mode 100644
index 0000000..f70f5a3
--- /dev/null
+++ b/t/plugin_dir/data/head.html
@@ -0,0 +1,6 @@
+<html>
+<head>
+<title>$blog_title</title>
+</head>
+<body>
+<h1>$blog_title</h1>
diff --git a/t/plugin_dir/data/story.html b/t/plugin_dir/data/story.html
new file mode 100644
index 0000000..ca627b8
--- /dev/null
+++ b/t/plugin_dir/data/story.html
@@ -0,0 +1,2 @@
+$dump_plugins::list
+$body
diff --git a/t/plugin_dir/expected.html b/t/plugin_dir/expected.html
new file mode 100644
index 0000000..4c5f854
--- /dev/null
+++ b/t/plugin_dir/expected.html
@@ -0,0 +1,22 @@
+Content-Type: text/html; charset=ISO-8859-1
+
+<html>
+<head>
+<title>plugin_list test</title>
+</head>
+<body>
+<h1>plugin_list test</h1>
+
+<pre>
+plugin2
+plugin4
+dump_plugins
+plugin1
+plugin3
+</pre>
+
+
+Story 1 text
+
+</body>
+</html>
diff --git a/t/plugin_dir/plugins/02plugin2 b/t/plugin_dir/plugins/02plugin2
new file mode 100644
index 0000000..1c86931
--- /dev/null
+++ b/t/plugin_dir/plugins/02plugin2
@@ -0,0 +1,3 @@
+package plugin2;
+sub start { 1 };
+1;
diff --git a/t/plugin_dir/plugins/04plugin4_ b/t/plugin_dir/plugins/04plugin4_
new file mode 100644
index 0000000..2ddb545
--- /dev/null
+++ b/t/plugin_dir/plugins/04plugin4_
@@ -0,0 +1,3 @@
+package plugin4;
+sub start { 1 };
+1;
diff --git a/t/plugin_dir/plugins/dump_plugins b/t/plugin_dir/plugins/dump_plugins
new file mode 100644
index 0000000..3550b4b
--- /dev/null
+++ b/t/plugin_dir/plugins/dump_plugins
@@ -0,0 +1,5 @@
+package dump_plugins;
+use vars qw($list);
+sub start { 1 };
+sub head { $list = sprintf "<pre>\n%s\n</pre>\n", join("\n", @blosxom::plugins); }
+1;
diff --git a/t/plugin_dir/plugins/plugin1 b/t/plugin_dir/plugins/plugin1
new file mode 100644
index 0000000..635cd26
--- /dev/null
+++ b/t/plugin_dir/plugins/plugin1
@@ -0,0 +1,3 @@
+package plugin1;
+sub start { 1 };
+1;
diff --git a/t/plugin_dir/plugins/plugin3_ b/t/plugin_dir/plugins/plugin3_
new file mode 100644
index 0000000..e2d75ce
--- /dev/null
+++ b/t/plugin_dir/plugins/plugin3_
@@ -0,0 +1,3 @@
+package plugin3;
+sub start { 1 };
+1;
diff --git a/t/plugin_dir/spec.yaml b/t/plugin_dir/spec.yaml
new file mode 100644
index 0000000..93883d3
--- /dev/null
+++ b/t/plugin_dir/spec.yaml
@@ -0,0 +1,4 @@
+tests:
+ -
+ - ""
+ - expected.html
diff --git a/t/plugin_list/README b/t/plugin_list/README
new file mode 100644
index 0000000..5b3536c
--- /dev/null
+++ b/t/plugin_list/README
@@ -0,0 +1 @@
+Testing plugin loading via $plugin_list
diff --git a/t/plugin_list/config/blosxom.conf b/t/plugin_list/config/blosxom.conf
new file mode 100644
index 0000000..859eb10
--- /dev/null
+++ b/t/plugin_list/config/blosxom.conf
@@ -0,0 +1,5 @@
+$blog_title = 'plugin_list test';
+$blog_encoding = 'ISO-8859-1';
+$datadir = "$ENV{BLOSXOM_CONFIG_DIR}/../data";
+$plugin_list = "$ENV{BLOSXOM_CONFIG_DIR}/plugins.conf";
+$plugin_dir = "$ENV{BLOSXOM_CONFIG_DIR}/../plugins";
diff --git a/t/plugin_list/config/plugins.conf b/t/plugin_list/config/plugins.conf
new file mode 100644
index 0000000..3a4090e
--- /dev/null
+++ b/t/plugin_list/config/plugins.conf
@@ -0,0 +1,19 @@
+
+# Bare
+plugin1
+
+# Numbered
+02plugin2
+
+# Underscored
+plugin3_
+
+# Numbered and underscored
+04plugin4_
+
+# Commented out
+# plugin5
+
+# Real plugin - dump the list of plugins
+dump_plugins
+
diff --git a/t/plugin_list/data/1.txt b/t/plugin_list/data/1.txt
new file mode 100644
index 0000000..748c525
--- /dev/null
+++ b/t/plugin_list/data/1.txt
@@ -0,0 +1,4 @@
+Story 1
+
+Story 1 text
+
diff --git a/t/plugin_list/data/date.html b/t/plugin_list/data/date.html
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/t/plugin_list/data/date.html
@@ -0,0 +1 @@
+
diff --git a/t/plugin_list/data/foot.html b/t/plugin_list/data/foot.html
new file mode 100644
index 0000000..308b1d0
--- /dev/null
+++ b/t/plugin_list/data/foot.html
@@ -0,0 +1,2 @@
+</body>
+</html>
diff --git a/t/plugin_list/data/head.html b/t/plugin_list/data/head.html
new file mode 100644
index 0000000..f70f5a3
--- /dev/null
+++ b/t/plugin_list/data/head.html
@@ -0,0 +1,6 @@
+<html>
+<head>
+<title>$blog_title</title>
+</head>
+<body>
+<h1>$blog_title</h1>
diff --git a/t/plugin_list/data/story.html b/t/plugin_list/data/story.html
new file mode 100644
index 0000000..ca627b8
--- /dev/null
+++ b/t/plugin_list/data/story.html
@@ -0,0 +1,2 @@
+$dump_plugins::list
+$body
diff --git a/t/plugin_list/expected.html b/t/plugin_list/expected.html
new file mode 100644
index 0000000..14603c8
--- /dev/null
+++ b/t/plugin_list/expected.html
@@ -0,0 +1,22 @@
+Content-Type: text/html; charset=ISO-8859-1
+
+<html>
+<head>
+<title>plugin_list test</title>
+</head>
+<body>
+<h1>plugin_list test</h1>
+
+<pre>
+plugin1
+plugin2
+plugin3
+plugin4
+dump_plugins
+</pre>
+
+
+Story 1 text
+
+</body>
+</html>
diff --git a/t/plugin_list/plugins/dump_plugins b/t/plugin_list/plugins/dump_plugins
new file mode 100644
index 0000000..3550b4b
--- /dev/null
+++ b/t/plugin_list/plugins/dump_plugins
@@ -0,0 +1,5 @@
+package dump_plugins;
+use vars qw($list);
+sub start { 1 };
+sub head { $list = sprintf "<pre>\n%s\n</pre>\n", join("\n", @blosxom::plugins); }
+1;
diff --git a/t/plugin_list/plugins/plugin1 b/t/plugin_list/plugins/plugin1
new file mode 100644
index 0000000..635cd26
--- /dev/null
+++ b/t/plugin_list/plugins/plugin1
@@ -0,0 +1,3 @@
+package plugin1;
+sub start { 1 };
+1;
diff --git a/t/plugin_list/plugins/plugin2 b/t/plugin_list/plugins/plugin2
new file mode 100644
index 0000000..1c86931
--- /dev/null
+++ b/t/plugin_list/plugins/plugin2
@@ -0,0 +1,3 @@
+package plugin2;
+sub start { 1 };
+1;
diff --git a/t/plugin_list/plugins/plugin3 b/t/plugin_list/plugins/plugin3
new file mode 100644
index 0000000..e2d75ce
--- /dev/null
+++ b/t/plugin_list/plugins/plugin3
@@ -0,0 +1,3 @@
+package plugin3;
+sub start { 1 };
+1;
diff --git a/t/plugin_list/plugins/plugin4 b/t/plugin_list/plugins/plugin4
new file mode 100644
index 0000000..2ddb545
--- /dev/null
+++ b/t/plugin_list/plugins/plugin4
@@ -0,0 +1,3 @@
+package plugin4;
+sub start { 1 };
+1;
diff --git a/t/plugin_list/plugins/plugin5 b/t/plugin_list/plugins/plugin5
new file mode 100644
index 0000000..17a57bc
--- /dev/null
+++ b/t/plugin_list/plugins/plugin5
@@ -0,0 +1,3 @@
+package plugin5;
+sub start { 1 };
+1;
diff --git a/t/plugin_list/spec.yaml b/t/plugin_list/spec.yaml
new file mode 100644
index 0000000..93883d3
--- /dev/null
+++ b/t/plugin_list/spec.yaml
@@ -0,0 +1,4 @@
+tests:
+ -
+ - ""
+ - expected.html
diff --git a/t/smoketest/config/blosxom.conf b/t/smoketest/config/blosxom.conf
new file mode 100644
index 0000000..334ecc2
--- /dev/null
+++ b/t/smoketest/config/blosxom.conf
@@ -0,0 +1,2 @@
+$datadir = "$ENV{BLOSXOM_CONFIG_DIR}/../data";
+$blog_encoding = 'ISO-8859-1';
diff --git a/t/smoketest/data/.0.txt b/t/smoketest/data/.0.txt
new file mode 100644
index 0000000..86c9c70
--- /dev/null
+++ b/t/smoketest/data/.0.txt
@@ -0,0 +1,10 @@
+Lorem ipsum dolor sit
+
+Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+facto.Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet
+ipso facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor
+sit amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
diff --git a/t/smoketest/data/1.txt b/t/smoketest/data/1.txt
new file mode 100644
index 0000000..ea2a941
--- /dev/null
+++ b/t/smoketest/data/1.txt
@@ -0,0 +1,16 @@
+Lorem ipsum
+Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+facto.Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet
+ipso facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor
+sit amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.Lorem ipso foer tyr wuz de ramas cora dola tym
+ipso hor tyr wuz de ramas cora dola tymon ipso foer tyr wuz de ramas
+cora dola tymo. Lorem ipso hoccer foer tyr wuz de ras cora dola tymon
+ipso hoc cer fuz de ramas cora dola tymon ipso hoccer. Lorem ipso foer
+tyr wuz de ramas cora dola tym ipso hor.
diff --git a/t/smoketest/data/1.txt.200607192254 b/t/smoketest/data/1.txt.200607192254
new file mode 100644
index 0000000..ea2a941
--- /dev/null
+++ b/t/smoketest/data/1.txt.200607192254
@@ -0,0 +1,16 @@
+Lorem ipsum
+Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+facto.Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet
+ipso facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor
+sit amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.Lorem ipso foer tyr wuz de ramas cora dola tym
+ipso hor tyr wuz de ramas cora dola tymon ipso foer tyr wuz de ramas
+cora dola tymo. Lorem ipso hoccer foer tyr wuz de ras cora dola tymon
+ipso hoc cer fuz de ramas cora dola tymon ipso hoccer. Lorem ipso foer
+tyr wuz de ramas cora dola tym ipso hor.
diff --git a/t/smoketest/expected.html b/t/smoketest/expected.html
new file mode 100644
index 0000000..c045b89
--- /dev/null
+++ b/t/smoketest/expected.html
@@ -0,0 +1,40 @@
+Content-Type: text/html; charset=ISO-8859-1
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" >
+ <link rel="alternate" type="application/rss+xml" title="RSS" href="http://localhost/index.rss" >
+ <title>My Weblog </title>
+ </head>
+ <body>
+ <div align="center">
+ <h1>My Weblog</h1>
+ <p> </p>
+ </div>
+ <h2>Wed, 19 Jul 2006</h2>
+ <div>
+ <h3><a name="1">Lorem ipsum</a></h3>
+ <div>Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+facto.Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet
+ipso facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor
+sit amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.Lorem ipso foer tyr wuz de ramas cora dola tym
+ipso hor tyr wuz de ramas cora dola tymon ipso foer tyr wuz de ramas
+cora dola tymo. Lorem ipso hoccer foer tyr wuz de ras cora dola tymon
+ipso hoc cer fuz de ramas cora dola tymon ipso hoccer. Lorem ipso foer
+tyr wuz de ramas cora dola tym ipso hor.</div>
+ <p>posted at: 22:54 | path: <a href="http://localhost"></a> | <a href="http://localhost/2006/07/19#1">permanent link to this entry</a></p>
+ </div>
+
+ <div align="center">
+ <a href="http://blosxom.sourceforge.net/"><img src="http://blosxom.sourceforge.net/images/pb_blosxom.gif" alt="powered by blosxom" border="0" width="90" height="33" ></a>
+ </div>
+ </body>
+</html>
diff --git a/t/smoketest/expected.rss b/t/smoketest/expected.rss
new file mode 100644
index 0000000..bcbeeee
--- /dev/null
+++ b/t/smoketest/expected.rss
@@ -0,0 +1,36 @@
+Content-Type: text/xml; charset=ISO-8859-1
+
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<rss version="2.0">
+ <channel>
+ <title>My Weblog</title>
+ <link>http://localhost/</link>
+ <description>Yet another Blosxom weblog.</description>
+ <language>en</language>
+ <docs>http://blogs.law.harvard.edu/tech/rss</docs>
+ <generator>blosxom/2.2.0</generator>
+
+ <item>
+ <title>Lorem ipsum</title>
+ <pubDate>Wed, 19 Jul 2006 22:54:00 +0000</pubDate>
+ <link>http://localhost/2006/07/19#1</link>
+ <category></category>
+ <guid isPermaLink="false">http://localhost/1</guid>
+ <description>Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+facto.Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet
+ipso facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor
+sit amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.Lorem ipso foer tyr wuz de ramas cora dola tym
+ipso hor tyr wuz de ramas cora dola tymon ipso foer tyr wuz de ramas
+cora dola tymo. Lorem ipso hoccer foer tyr wuz de ras cora dola tymon
+ipso hoc cer fuz de ramas cora dola tymon ipso hoccer. Lorem ipso foer
+tyr wuz de ramas cora dola tym ipso hor.</description>
+ </item>
+ </channel>
+</rss>
diff --git a/t/smoketest/spec.yaml b/t/smoketest/spec.yaml
new file mode 100644
index 0000000..02f8989
--- /dev/null
+++ b/t/smoketest/spec.yaml
@@ -0,0 +1,7 @@
+tests:
+ -
+ - ""
+ - expected.html
+ -
+ - "flav=rss"
+ - "expected.rss"
diff --git a/t/static_basic/config/blosxom.conf b/t/static_basic/config/blosxom.conf
new file mode 100644
index 0000000..7d8ef26
--- /dev/null
+++ b/t/static_basic/config/blosxom.conf
@@ -0,0 +1,4 @@
+$datadir = "$ENV{BLOSXOM_CONFIG_DIR}/../data";
+$static_dir = "$ENV{BLOSXOM_CONFIG_DIR}/../static";
+$static_password = 'static';
+@static_flavours = qw/html rss/;
diff --git a/t/static_basic/config/plugins.conf b/t/static_basic/config/plugins.conf
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/t/static_basic/config/plugins.conf
diff --git a/t/static_basic/data/1.txt b/t/static_basic/data/1.txt
new file mode 100644
index 0000000..ea2a941
--- /dev/null
+++ b/t/static_basic/data/1.txt
@@ -0,0 +1,16 @@
+Lorem ipsum
+Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+facto.Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet
+ipso facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor
+sit amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.Lorem ipso foer tyr wuz de ramas cora dola tym
+ipso hor tyr wuz de ramas cora dola tymon ipso foer tyr wuz de ramas
+cora dola tymo. Lorem ipso hoccer foer tyr wuz de ras cora dola tymon
+ipso hoc cer fuz de ramas cora dola tymon ipso hoccer. Lorem ipso foer
+tyr wuz de ramas cora dola tym ipso hor.
diff --git a/t/static_basic/data/1.txt.200607192254 b/t/static_basic/data/1.txt.200607192254
new file mode 100644
index 0000000..ea2a941
--- /dev/null
+++ b/t/static_basic/data/1.txt.200607192254
@@ -0,0 +1,16 @@
+Lorem ipsum
+Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+facto.Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet
+ipso facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor
+sit amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.Lorem ipso foer tyr wuz de ramas cora dola tym
+ipso hor tyr wuz de ramas cora dola tymon ipso foer tyr wuz de ramas
+cora dola tymo. Lorem ipso hoccer foer tyr wuz de ras cora dola tymon
+ipso hoc cer fuz de ramas cora dola tymon ipso hoccer. Lorem ipso foer
+tyr wuz de ramas cora dola tym ipso hor.
diff --git a/t/static_basic/data/content_type.html b/t/static_basic/data/content_type.html
new file mode 100644
index 0000000..e81f92a
--- /dev/null
+++ b/t/static_basic/data/content_type.html
@@ -0,0 +1 @@
+text/xhtml; charset=UTF-8
diff --git a/t/static_basic/data/date.html b/t/static_basic/data/date.html
new file mode 100644
index 0000000..2cdf76d
--- /dev/null
+++ b/t/static_basic/data/date.html
@@ -0,0 +1 @@
+ <h3>$yr-$mo_num-$da</h3>
diff --git a/t/static_basic/data/foot.html b/t/static_basic/data/foot.html
new file mode 100644
index 0000000..5179ade
--- /dev/null
+++ b/t/static_basic/data/foot.html
@@ -0,0 +1,3 @@
+
+ </body>
+</html>
diff --git a/t/static_basic/data/head.html b/t/static_basic/data/head.html
new file mode 100644
index 0000000..7426227
--- /dev/null
+++ b/t/static_basic/data/head.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+ <head>
+ <link rel="alternate" type="application/rss+xml" title="RSS" href="$url/index.rss" />
+ <title>$blog_title $path_info_da $path_info_mo $path_info_yr
+ </title>
+ </head>
+ <body>
+ <h1>$blog_title</h1>
+ <h2>$path_info_da $path_info_mo $path_info_yr</h2>
diff --git a/t/static_basic/data/story.html b/t/static_basic/data/story.html
new file mode 100644
index 0000000..7f3d068
--- /dev/null
+++ b/t/static_basic/data/story.html
@@ -0,0 +1,3 @@
+ <h4><a name="$fn">$title</a></h4>
+ <div>$body</div>
+ <p>posted at: $ti | path: <a href="$url$path">$path </a> | <a href="$url/$yr/$mo_num/$da#$fn">permanent link to this entry</a></p>
diff --git a/t/static_basic/expected/2006/07/19/index.html b/t/static_basic/expected/2006/07/19/index.html
new file mode 100644
index 0000000..befcf2d
--- /dev/null
+++ b/t/static_basic/expected/2006/07/19/index.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+ <head>
+ <link rel="alternate" type="application/rss+xml" title="RSS" href="http://localhost/index.rss" />
+ <title>My Weblog 19 07 2006
+ </title>
+ </head>
+ <body>
+ <h1>My Weblog</h1>
+ <h2>19 07 2006</h2>
+ <h3>2006-07-19</h3>
+ <h4><a name="1">Lorem ipsum</a></h4>
+ <div>Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+facto.Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet
+ipso facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor
+sit amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.Lorem ipso foer tyr wuz de ramas cora dola tym
+ipso hor tyr wuz de ramas cora dola tymon ipso foer tyr wuz de ramas
+cora dola tymo. Lorem ipso hoccer foer tyr wuz de ras cora dola tymon
+ipso hoc cer fuz de ramas cora dola tymon ipso hoccer. Lorem ipso foer
+tyr wuz de ramas cora dola tym ipso hor.</div>
+ <p>posted at: 22:54 | path: <a href="http://localhost"> </a> | <a href="http://localhost/2006/07/19#1">permanent link to this entry</a></p>
+
+ </body>
+</html>
diff --git a/t/static_basic/expected/2006/07/19/index.rss b/t/static_basic/expected/2006/07/19/index.rss
new file mode 100644
index 0000000..2ad0267
--- /dev/null
+++ b/t/static_basic/expected/2006/07/19/index.rss
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<rss version="2.0">
+ <channel>
+ <title>My Weblog</title>
+ <link>http://localhost/</link>
+ <description>Yet another Blosxom weblog.</description>
+ <language>en</language>
+ <docs>http://blogs.law.harvard.edu/tech/rss</docs>
+ <generator>blosxom/2.2.0</generator>
+
+ <item>
+ <title>Lorem ipsum</title>
+ <pubDate>Wed, 19 Jul 2006 22:54:00 +0000</pubDate>
+ <link>http://localhost/2006/07/19#1</link>
+ <category></category>
+ <guid isPermaLink="false">http://localhost/1</guid>
+ <description>Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+facto.Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet
+ipso facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor
+sit amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.Lorem ipso foer tyr wuz de ramas cora dola tym
+ipso hor tyr wuz de ramas cora dola tymon ipso foer tyr wuz de ramas
+cora dola tymo. Lorem ipso hoccer foer tyr wuz de ras cora dola tymon
+ipso hoc cer fuz de ramas cora dola tymon ipso hoccer. Lorem ipso foer
+tyr wuz de ramas cora dola tym ipso hor.</description>
+ </item>
+ </channel>
+</rss>
diff --git a/t/static_basic/expected/2006/07/index.html b/t/static_basic/expected/2006/07/index.html
new file mode 100644
index 0000000..e2a2c52
--- /dev/null
+++ b/t/static_basic/expected/2006/07/index.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+ <head>
+ <link rel="alternate" type="application/rss+xml" title="RSS" href="http://localhost/index.rss" />
+ <title>My Weblog 07 2006
+ </title>
+ </head>
+ <body>
+ <h1>My Weblog</h1>
+ <h2> 07 2006</h2>
+ <h3>2006-07-19</h3>
+ <h4><a name="1">Lorem ipsum</a></h4>
+ <div>Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+facto.Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet
+ipso facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor
+sit amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.Lorem ipso foer tyr wuz de ramas cora dola tym
+ipso hor tyr wuz de ramas cora dola tymon ipso foer tyr wuz de ramas
+cora dola tymo. Lorem ipso hoccer foer tyr wuz de ras cora dola tymon
+ipso hoc cer fuz de ramas cora dola tymon ipso hoccer. Lorem ipso foer
+tyr wuz de ramas cora dola tym ipso hor.</div>
+ <p>posted at: 22:54 | path: <a href="http://localhost"> </a> | <a href="http://localhost/2006/07/19#1">permanent link to this entry</a></p>
+
+ </body>
+</html>
diff --git a/t/static_basic/expected/2006/07/index.rss b/t/static_basic/expected/2006/07/index.rss
new file mode 100644
index 0000000..2ad0267
--- /dev/null
+++ b/t/static_basic/expected/2006/07/index.rss
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<rss version="2.0">
+ <channel>
+ <title>My Weblog</title>
+ <link>http://localhost/</link>
+ <description>Yet another Blosxom weblog.</description>
+ <language>en</language>
+ <docs>http://blogs.law.harvard.edu/tech/rss</docs>
+ <generator>blosxom/2.2.0</generator>
+
+ <item>
+ <title>Lorem ipsum</title>
+ <pubDate>Wed, 19 Jul 2006 22:54:00 +0000</pubDate>
+ <link>http://localhost/2006/07/19#1</link>
+ <category></category>
+ <guid isPermaLink="false">http://localhost/1</guid>
+ <description>Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+facto.Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet
+ipso facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor
+sit amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.Lorem ipso foer tyr wuz de ramas cora dola tym
+ipso hor tyr wuz de ramas cora dola tymon ipso foer tyr wuz de ramas
+cora dola tymo. Lorem ipso hoccer foer tyr wuz de ras cora dola tymon
+ipso hoc cer fuz de ramas cora dola tymon ipso hoccer. Lorem ipso foer
+tyr wuz de ramas cora dola tym ipso hor.</description>
+ </item>
+ </channel>
+</rss>
diff --git a/t/static_basic/expected/2006/index.html b/t/static_basic/expected/2006/index.html
new file mode 100644
index 0000000..6d1fd23
--- /dev/null
+++ b/t/static_basic/expected/2006/index.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+ <head>
+ <link rel="alternate" type="application/rss+xml" title="RSS" href="http://localhost/index.rss" />
+ <title>My Weblog 2006
+ </title>
+ </head>
+ <body>
+ <h1>My Weblog</h1>
+ <h2> 2006</h2>
+ <h3>2006-07-19</h3>
+ <h4><a name="1">Lorem ipsum</a></h4>
+ <div>Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+facto.Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet
+ipso facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor
+sit amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.Lorem ipso foer tyr wuz de ramas cora dola tym
+ipso hor tyr wuz de ramas cora dola tymon ipso foer tyr wuz de ramas
+cora dola tymo. Lorem ipso hoccer foer tyr wuz de ras cora dola tymon
+ipso hoc cer fuz de ramas cora dola tymon ipso hoccer. Lorem ipso foer
+tyr wuz de ramas cora dola tym ipso hor.</div>
+ <p>posted at: 22:54 | path: <a href="http://localhost"> </a> | <a href="http://localhost/2006/07/19#1">permanent link to this entry</a></p>
+
+ </body>
+</html>
diff --git a/t/static_basic/expected/2006/index.rss b/t/static_basic/expected/2006/index.rss
new file mode 100644
index 0000000..2ad0267
--- /dev/null
+++ b/t/static_basic/expected/2006/index.rss
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<rss version="2.0">
+ <channel>
+ <title>My Weblog</title>
+ <link>http://localhost/</link>
+ <description>Yet another Blosxom weblog.</description>
+ <language>en</language>
+ <docs>http://blogs.law.harvard.edu/tech/rss</docs>
+ <generator>blosxom/2.2.0</generator>
+
+ <item>
+ <title>Lorem ipsum</title>
+ <pubDate>Wed, 19 Jul 2006 22:54:00 +0000</pubDate>
+ <link>http://localhost/2006/07/19#1</link>
+ <category></category>
+ <guid isPermaLink="false">http://localhost/1</guid>
+ <description>Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+facto.Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet
+ipso facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor
+sit amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.Lorem ipso foer tyr wuz de ramas cora dola tym
+ipso hor tyr wuz de ramas cora dola tymon ipso foer tyr wuz de ramas
+cora dola tymo. Lorem ipso hoccer foer tyr wuz de ras cora dola tymon
+ipso hoc cer fuz de ramas cora dola tymon ipso hoccer. Lorem ipso foer
+tyr wuz de ramas cora dola tym ipso hor.</description>
+ </item>
+ </channel>
+</rss>
diff --git a/t/static_basic/expected/index.html b/t/static_basic/expected/index.html
new file mode 100644
index 0000000..d0a68a6
--- /dev/null
+++ b/t/static_basic/expected/index.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+ <head>
+ <link rel="alternate" type="application/rss+xml" title="RSS" href="http://localhost/index.rss" />
+ <title>My Weblog
+ </title>
+ </head>
+ <body>
+ <h1>My Weblog</h1>
+ <h2> </h2>
+ <h3>2006-07-19</h3>
+ <h4><a name="1">Lorem ipsum</a></h4>
+ <div>Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+facto.Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet
+ipso facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor
+sit amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.Lorem ipso foer tyr wuz de ramas cora dola tym
+ipso hor tyr wuz de ramas cora dola tymon ipso foer tyr wuz de ramas
+cora dola tymo. Lorem ipso hoccer foer tyr wuz de ras cora dola tymon
+ipso hoc cer fuz de ramas cora dola tymon ipso hoccer. Lorem ipso foer
+tyr wuz de ramas cora dola tym ipso hor.</div>
+ <p>posted at: 22:54 | path: <a href="http://localhost"> </a> | <a href="http://localhost/2006/07/19#1">permanent link to this entry</a></p>
+
+ </body>
+</html>
diff --git a/t/static_basic/expected/index.rss b/t/static_basic/expected/index.rss
new file mode 100644
index 0000000..2ad0267
--- /dev/null
+++ b/t/static_basic/expected/index.rss
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<rss version="2.0">
+ <channel>
+ <title>My Weblog</title>
+ <link>http://localhost/</link>
+ <description>Yet another Blosxom weblog.</description>
+ <language>en</language>
+ <docs>http://blogs.law.harvard.edu/tech/rss</docs>
+ <generator>blosxom/2.2.0</generator>
+
+ <item>
+ <title>Lorem ipsum</title>
+ <pubDate>Wed, 19 Jul 2006 22:54:00 +0000</pubDate>
+ <link>http://localhost/2006/07/19#1</link>
+ <category></category>
+ <guid isPermaLink="false">http://localhost/1</guid>
+ <description>Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+facto.Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet
+ipso facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor
+sit amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.Lorem ipso foer tyr wuz de ramas cora dola tym
+ipso hor tyr wuz de ramas cora dola tymon ipso foer tyr wuz de ramas
+cora dola tymo. Lorem ipso hoccer foer tyr wuz de ras cora dola tymon
+ipso hoc cer fuz de ramas cora dola tymon ipso hoccer. Lorem ipso foer
+tyr wuz de ramas cora dola tym ipso hor.</description>
+ </item>
+ </channel>
+</rss>
diff --git a/t/static_basic/spec.yaml b/t/static_basic/spec.yaml
new file mode 100644
index 0000000..9c82ce4
--- /dev/null
+++ b/t/static_basic/spec.yaml
@@ -0,0 +1 @@
+expected: expected
diff --git a/t/static_configure/config/blosxom.conf b/t/static_configure/config/blosxom.conf
new file mode 100644
index 0000000..1ed8138
--- /dev/null
+++ b/t/static_configure/config/blosxom.conf
@@ -0,0 +1,6 @@
+$datadir = "$ENV{BLOSXOM_CONFIG_DIR}/../data";
+$static_dir = "$ENV{BLOSXOM_CONFIG_DIR}/../static";
+$static_date_pages = 0;
+$static_entries = 1;
+$static_password = 'static';
+@static_flavours = qw/html rss/;
diff --git a/t/static_configure/config/plugins.conf b/t/static_configure/config/plugins.conf
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/t/static_configure/config/plugins.conf
diff --git a/t/static_configure/data/1.txt b/t/static_configure/data/1.txt
new file mode 100644
index 0000000..ea2a941
--- /dev/null
+++ b/t/static_configure/data/1.txt
@@ -0,0 +1,16 @@
+Lorem ipsum
+Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+facto.Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet
+ipso facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor
+sit amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.Lorem ipso foer tyr wuz de ramas cora dola tym
+ipso hor tyr wuz de ramas cora dola tymon ipso foer tyr wuz de ramas
+cora dola tymo. Lorem ipso hoccer foer tyr wuz de ras cora dola tymon
+ipso hoc cer fuz de ramas cora dola tymon ipso hoccer. Lorem ipso foer
+tyr wuz de ramas cora dola tym ipso hor.
diff --git a/t/static_configure/data/1.txt.200607192254 b/t/static_configure/data/1.txt.200607192254
new file mode 100644
index 0000000..ea2a941
--- /dev/null
+++ b/t/static_configure/data/1.txt.200607192254
@@ -0,0 +1,16 @@
+Lorem ipsum
+Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+facto.Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet
+ipso facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor
+sit amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.Lorem ipso foer tyr wuz de ramas cora dola tym
+ipso hor tyr wuz de ramas cora dola tymon ipso foer tyr wuz de ramas
+cora dola tymo. Lorem ipso hoccer foer tyr wuz de ras cora dola tymon
+ipso hoc cer fuz de ramas cora dola tymon ipso hoccer. Lorem ipso foer
+tyr wuz de ramas cora dola tym ipso hor.
diff --git a/t/static_configure/data/2.txt b/t/static_configure/data/2.txt
new file mode 100644
index 0000000..c00c5ce
--- /dev/null
+++ b/t/static_configure/data/2.txt
@@ -0,0 +1,11 @@
+Lorem ipsum II
+
+Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.Lorem ipso foer tyr wuz de ramas cora dola tym
+ipso hor tyr wuz de ramas cora dola tymon ipso foer tyr wuz de ramas
+cora dola tymo.
diff --git a/t/static_configure/data/2.txt.200609301235 b/t/static_configure/data/2.txt.200609301235
new file mode 100644
index 0000000..c00c5ce
--- /dev/null
+++ b/t/static_configure/data/2.txt.200609301235
@@ -0,0 +1,11 @@
+Lorem ipsum II
+
+Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.Lorem ipso foer tyr wuz de ramas cora dola tym
+ipso hor tyr wuz de ramas cora dola tymon ipso foer tyr wuz de ramas
+cora dola tymo.
diff --git a/t/static_configure/data/content_type.html b/t/static_configure/data/content_type.html
new file mode 100644
index 0000000..e81f92a
--- /dev/null
+++ b/t/static_configure/data/content_type.html
@@ -0,0 +1 @@
+text/xhtml; charset=UTF-8
diff --git a/t/static_configure/data/date.html b/t/static_configure/data/date.html
new file mode 100644
index 0000000..2cdf76d
--- /dev/null
+++ b/t/static_configure/data/date.html
@@ -0,0 +1 @@
+ <h3>$yr-$mo_num-$da</h3>
diff --git a/t/static_configure/data/foot.html b/t/static_configure/data/foot.html
new file mode 100644
index 0000000..5179ade
--- /dev/null
+++ b/t/static_configure/data/foot.html
@@ -0,0 +1,3 @@
+
+ </body>
+</html>
diff --git a/t/static_configure/data/head.html b/t/static_configure/data/head.html
new file mode 100644
index 0000000..d2ad725
--- /dev/null
+++ b/t/static_configure/data/head.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+ <head>
+ <link rel="alternate" type="application/rss+xml" title="RSS" href="$url/index.rss" />
+ <title>$blog_title</title>
+ </head>
+ <body>
+ <h1>$blog_title</h1>
+ <h2>$blog_description</h2>
diff --git a/t/static_configure/data/story.html b/t/static_configure/data/story.html
new file mode 100644
index 0000000..7f3d068
--- /dev/null
+++ b/t/static_configure/data/story.html
@@ -0,0 +1,3 @@
+ <h4><a name="$fn">$title</a></h4>
+ <div>$body</div>
+ <p>posted at: $ti | path: <a href="$url$path">$path </a> | <a href="$url/$yr/$mo_num/$da#$fn">permanent link to this entry</a></p>
diff --git a/t/static_configure/data/web/2.txt b/t/static_configure/data/web/2.txt
new file mode 100644
index 0000000..4c63921
--- /dev/null
+++ b/t/static_configure/data/web/2.txt
@@ -0,0 +1,10 @@
+Lorem ipsum II
+
+Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.
+
diff --git a/t/static_configure/data/web/2.txt.200711111111 b/t/static_configure/data/web/2.txt.200711111111
new file mode 100644
index 0000000..4c63921
--- /dev/null
+++ b/t/static_configure/data/web/2.txt.200711111111
@@ -0,0 +1,10 @@
+Lorem ipsum II
+
+Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.
+
diff --git a/t/static_configure/expected/1.html b/t/static_configure/expected/1.html
new file mode 100644
index 0000000..bdb2670
--- /dev/null
+++ b/t/static_configure/expected/1.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+ <head>
+ <link rel="alternate" type="application/rss+xml" title="RSS" href="http://localhost/index.rss" />
+ <title>My Weblog</title>
+ </head>
+ <body>
+ <h1>My Weblog</h1>
+ <h2>Yet another Blosxom weblog.</h2>
+ <h3>2006-07-19</h3>
+ <h4><a name="1">Lorem ipsum</a></h4>
+ <div>Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+facto.Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet
+ipso facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor
+sit amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.Lorem ipso foer tyr wuz de ramas cora dola tym
+ipso hor tyr wuz de ramas cora dola tymon ipso foer tyr wuz de ramas
+cora dola tymo. Lorem ipso hoccer foer tyr wuz de ras cora dola tymon
+ipso hoc cer fuz de ramas cora dola tymon ipso hoccer. Lorem ipso foer
+tyr wuz de ramas cora dola tym ipso hor.</div>
+ <p>posted at: 22:54 | path: <a href="http://localhost"> </a> | <a href="http://localhost/2006/07/19#1">permanent link to this entry</a></p>
+
+ </body>
+</html>
diff --git a/t/static_configure/expected/1.rss b/t/static_configure/expected/1.rss
new file mode 100644
index 0000000..aec1579
--- /dev/null
+++ b/t/static_configure/expected/1.rss
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<rss version="2.0">
+ <channel>
+ <title>My Weblog</title>
+ <link>http://localhost/1.rss</link>
+ <description>Yet another Blosxom weblog.</description>
+ <language>en</language>
+ <docs>http://blogs.law.harvard.edu/tech/rss</docs>
+ <generator>blosxom/2.2.0</generator>
+
+ <item>
+ <title>Lorem ipsum</title>
+ <pubDate>Wed, 19 Jul 2006 22:54:00 +0000</pubDate>
+ <link>http://localhost/2006/07/19#1</link>
+ <category></category>
+ <guid isPermaLink="false">http://localhost/1</guid>
+ <description>Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+facto.Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet
+ipso facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor
+sit amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.Lorem ipso foer tyr wuz de ramas cora dola tym
+ipso hor tyr wuz de ramas cora dola tymon ipso foer tyr wuz de ramas
+cora dola tymo. Lorem ipso hoccer foer tyr wuz de ras cora dola tymon
+ipso hoc cer fuz de ramas cora dola tymon ipso hoccer. Lorem ipso foer
+tyr wuz de ramas cora dola tym ipso hor.</description>
+ </item>
+ </channel>
+</rss>
diff --git a/t/static_configure/expected/2.html b/t/static_configure/expected/2.html
new file mode 100644
index 0000000..ccb3f12
--- /dev/null
+++ b/t/static_configure/expected/2.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+ <head>
+ <link rel="alternate" type="application/rss+xml" title="RSS" href="http://localhost/index.rss" />
+ <title>My Weblog</title>
+ </head>
+ <body>
+ <h1>My Weblog</h1>
+ <h2>Yet another Blosxom weblog.</h2>
+ <h3>2006-09-30</h3>
+ <h4><a name="2">Lorem ipsum II</a></h4>
+ <div>
+Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.Lorem ipso foer tyr wuz de ramas cora dola tym
+ipso hor tyr wuz de ramas cora dola tymon ipso foer tyr wuz de ramas
+cora dola tymo. </div>
+ <p>posted at: 12:35 | path: <a href="http://localhost"> </a> | <a href="http://localhost/2006/09/30#2">permanent link to this entry</a></p>
+
+ </body>
+</html>
diff --git a/t/static_configure/expected/2.rss b/t/static_configure/expected/2.rss
new file mode 100644
index 0000000..60adf20
--- /dev/null
+++ b/t/static_configure/expected/2.rss
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<rss version="2.0">
+ <channel>
+ <title>My Weblog</title>
+ <link>http://localhost/2.rss</link>
+ <description>Yet another Blosxom weblog.</description>
+ <language>en</language>
+ <docs>http://blogs.law.harvard.edu/tech/rss</docs>
+ <generator>blosxom/2.2.0</generator>
+
+ <item>
+ <title>Lorem ipsum II</title>
+ <pubDate>Sat, 30 Sep 2006 12:35:00 +0000</pubDate>
+ <link>http://localhost/2006/09/30#2</link>
+ <category></category>
+ <guid isPermaLink="false">http://localhost/2</guid>
+ <description>
+Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.Lorem ipso foer tyr wuz de ramas cora dola tym
+ipso hor tyr wuz de ramas cora dola tymon ipso foer tyr wuz de ramas
+cora dola tymo. </description>
+ </item>
+ </channel>
+</rss>
diff --git a/t/static_configure/expected/index.html b/t/static_configure/expected/index.html
new file mode 100644
index 0000000..fdf3a43
--- /dev/null
+++ b/t/static_configure/expected/index.html
@@ -0,0 +1,56 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+ <head>
+ <link rel="alternate" type="application/rss+xml" title="RSS" href="http://localhost/index.rss" />
+ <title>My Weblog</title>
+ </head>
+ <body>
+ <h1>My Weblog</h1>
+ <h2>Yet another Blosxom weblog.</h2>
+ <h3>2007-11-11</h3>
+ <h4><a name="2">Lorem ipsum II</a></h4>
+ <div>
+Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.
+</div>
+ <p>posted at: 11:11 | path: <a href="http://localhost/web">/web </a> | <a href="http://localhost/2007/11/11#2">permanent link to this entry</a></p>
+ <h3>2006-09-30</h3>
+ <h4><a name="2">Lorem ipsum II</a></h4>
+ <div>
+Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.Lorem ipso foer tyr wuz de ramas cora dola tym
+ipso hor tyr wuz de ramas cora dola tymon ipso foer tyr wuz de ramas
+cora dola tymo. </div>
+ <p>posted at: 12:35 | path: <a href="http://localhost"> </a> | <a href="http://localhost/2006/09/30#2">permanent link to this entry</a></p>
+ <h3>2006-07-19</h3>
+ <h4><a name="1">Lorem ipsum</a></h4>
+ <div>Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+facto.Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet
+ipso facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor
+sit amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.Lorem ipso foer tyr wuz de ramas cora dola tym
+ipso hor tyr wuz de ramas cora dola tymon ipso foer tyr wuz de ramas
+cora dola tymo. Lorem ipso hoccer foer tyr wuz de ras cora dola tymon
+ipso hoc cer fuz de ramas cora dola tymon ipso hoccer. Lorem ipso foer
+tyr wuz de ramas cora dola tym ipso hor.</div>
+ <p>posted at: 22:54 | path: <a href="http://localhost"> </a> | <a href="http://localhost/2006/07/19#1">permanent link to this entry</a></p>
+
+ </body>
+</html>
diff --git a/t/static_configure/expected/index.rss b/t/static_configure/expected/index.rss
new file mode 100644
index 0000000..df0d321
--- /dev/null
+++ b/t/static_configure/expected/index.rss
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<rss version="2.0">
+ <channel>
+ <title>My Weblog</title>
+ <link>http://localhost/</link>
+ <description>Yet another Blosxom weblog.</description>
+ <language>en</language>
+ <docs>http://blogs.law.harvard.edu/tech/rss</docs>
+ <generator>blosxom/2.2.0</generator>
+
+ <item>
+ <title>Lorem ipsum II</title>
+ <pubDate>Sun, 11 Nov 2007 11:11:00 +0000</pubDate>
+ <link>http://localhost/2007/11/11#2</link>
+ <category>/web</category>
+ <guid isPermaLink="false">http://localhost/web/2</guid>
+ <description>
+Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.
+</description>
+ </item>
+ <item>
+ <title>Lorem ipsum II</title>
+ <pubDate>Sat, 30 Sep 2006 12:35:00 +0000</pubDate>
+ <link>http://localhost/2006/09/30#2</link>
+ <category></category>
+ <guid isPermaLink="false">http://localhost/2</guid>
+ <description>
+Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.Lorem ipso foer tyr wuz de ramas cora dola tym
+ipso hor tyr wuz de ramas cora dola tymon ipso foer tyr wuz de ramas
+cora dola tymo. </description>
+ </item>
+ <item>
+ <title>Lorem ipsum</title>
+ <pubDate>Wed, 19 Jul 2006 22:54:00 +0000</pubDate>
+ <link>http://localhost/2006/07/19#1</link>
+ <category></category>
+ <guid isPermaLink="false">http://localhost/1</guid>
+ <description>Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+facto.Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet
+ipso facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor
+sit amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.Lorem ipso foer tyr wuz de ramas cora dola tym
+ipso hor tyr wuz de ramas cora dola tymon ipso foer tyr wuz de ramas
+cora dola tymo. Lorem ipso hoccer foer tyr wuz de ras cora dola tymon
+ipso hoc cer fuz de ramas cora dola tymon ipso hoccer. Lorem ipso foer
+tyr wuz de ramas cora dola tym ipso hor.</description>
+ </item>
+ </channel>
+</rss>
diff --git a/t/static_configure/expected/web/2.html b/t/static_configure/expected/web/2.html
new file mode 100644
index 0000000..6e960f2
--- /dev/null
+++ b/t/static_configure/expected/web/2.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+ <head>
+ <link rel="alternate" type="application/rss+xml" title="RSS" href="http://localhost/index.rss" />
+ <title>My Weblog</title>
+ </head>
+ <body>
+ <h1>My Weblog</h1>
+ <h2>Yet another Blosxom weblog.</h2>
+ <h3>2007-11-11</h3>
+ <h4><a name="2">Lorem ipsum II</a></h4>
+ <div>
+Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.
+</div>
+ <p>posted at: 11:11 | path: <a href="http://localhost/web">/web </a> | <a href="http://localhost/2007/11/11#2">permanent link to this entry</a></p>
+
+ </body>
+</html>
diff --git a/t/static_configure/expected/web/2.rss b/t/static_configure/expected/web/2.rss
new file mode 100644
index 0000000..371011f
--- /dev/null
+++ b/t/static_configure/expected/web/2.rss
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<rss version="2.0">
+ <channel>
+ <title>My Weblog</title>
+ <link>http://localhost/web/2.rss</link>
+ <description>Yet another Blosxom weblog.</description>
+ <language>en</language>
+ <docs>http://blogs.law.harvard.edu/tech/rss</docs>
+ <generator>blosxom/2.2.0</generator>
+
+ <item>
+ <title>Lorem ipsum II</title>
+ <pubDate>Sun, 11 Nov 2007 11:11:00 +0000</pubDate>
+ <link>http://localhost/2007/11/11#2</link>
+ <category>/web</category>
+ <guid isPermaLink="false">http://localhost/web/2</guid>
+ <description>
+Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.
+</description>
+ </item>
+ </channel>
+</rss>
diff --git a/t/static_configure/expected/web/index.html b/t/static_configure/expected/web/index.html
new file mode 100644
index 0000000..6e960f2
--- /dev/null
+++ b/t/static_configure/expected/web/index.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+ <head>
+ <link rel="alternate" type="application/rss+xml" title="RSS" href="http://localhost/index.rss" />
+ <title>My Weblog</title>
+ </head>
+ <body>
+ <h1>My Weblog</h1>
+ <h2>Yet another Blosxom weblog.</h2>
+ <h3>2007-11-11</h3>
+ <h4><a name="2">Lorem ipsum II</a></h4>
+ <div>
+Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.
+</div>
+ <p>posted at: 11:11 | path: <a href="http://localhost/web">/web </a> | <a href="http://localhost/2007/11/11#2">permanent link to this entry</a></p>
+
+ </body>
+</html>
diff --git a/t/static_configure/expected/web/index.rss b/t/static_configure/expected/web/index.rss
new file mode 100644
index 0000000..1951e1f
--- /dev/null
+++ b/t/static_configure/expected/web/index.rss
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<rss version="2.0">
+ <channel>
+ <title>My Weblog</title>
+ <link>http://localhost/web</link>
+ <description>Yet another Blosxom weblog.</description>
+ <language>en</language>
+ <docs>http://blogs.law.harvard.edu/tech/rss</docs>
+ <generator>blosxom/2.2.0</generator>
+
+ <item>
+ <title>Lorem ipsum II</title>
+ <pubDate>Sun, 11 Nov 2007 11:11:00 +0000</pubDate>
+ <link>http://localhost/2007/11/11#2</link>
+ <category>/web</category>
+ <guid isPermaLink="false">http://localhost/web/2</guid>
+ <description>
+Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.
+</description>
+ </item>
+ </channel>
+</rss>
diff --git a/t/static_configure/spec.yaml b/t/static_configure/spec.yaml
new file mode 100644
index 0000000..9c82ce4
--- /dev/null
+++ b/t/static_configure/spec.yaml
@@ -0,0 +1 @@
+expected: expected
diff --git a/t/templates/config/blosxom.conf b/t/templates/config/blosxom.conf
new file mode 100644
index 0000000..ae83e48
--- /dev/null
+++ b/t/templates/config/blosxom.conf
@@ -0,0 +1 @@
+$datadir = "$ENV{BLOSXOM_CONFIG_DIR}/../data";
diff --git a/t/templates/config/plugins.conf b/t/templates/config/plugins.conf
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/t/templates/config/plugins.conf
diff --git a/t/templates/data/1.txt b/t/templates/data/1.txt
new file mode 100644
index 0000000..ea2a941
--- /dev/null
+++ b/t/templates/data/1.txt
@@ -0,0 +1,16 @@
+Lorem ipsum
+Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+facto.Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet
+ipso facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor
+sit amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.Lorem ipso foer tyr wuz de ramas cora dola tym
+ipso hor tyr wuz de ramas cora dola tymon ipso foer tyr wuz de ramas
+cora dola tymo. Lorem ipso hoccer foer tyr wuz de ras cora dola tymon
+ipso hoc cer fuz de ramas cora dola tymon ipso hoccer. Lorem ipso foer
+tyr wuz de ramas cora dola tym ipso hor.
diff --git a/t/templates/data/1.txt.200607192254 b/t/templates/data/1.txt.200607192254
new file mode 100644
index 0000000..ea2a941
--- /dev/null
+++ b/t/templates/data/1.txt.200607192254
@@ -0,0 +1,16 @@
+Lorem ipsum
+Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+facto.Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet
+ipso facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor
+sit amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.Lorem ipso foer tyr wuz de ramas cora dola tym
+ipso hor tyr wuz de ramas cora dola tymon ipso foer tyr wuz de ramas
+cora dola tymo. Lorem ipso hoccer foer tyr wuz de ras cora dola tymon
+ipso hoc cer fuz de ramas cora dola tymon ipso hoccer. Lorem ipso foer
+tyr wuz de ramas cora dola tym ipso hor.
diff --git a/t/templates/data/content_type.html b/t/templates/data/content_type.html
new file mode 100644
index 0000000..e81f92a
--- /dev/null
+++ b/t/templates/data/content_type.html
@@ -0,0 +1 @@
+text/xhtml; charset=UTF-8
diff --git a/t/templates/data/date.html b/t/templates/data/date.html
new file mode 100644
index 0000000..2cdf76d
--- /dev/null
+++ b/t/templates/data/date.html
@@ -0,0 +1 @@
+ <h3>$yr-$mo_num-$da</h3>
diff --git a/t/templates/data/foot.html b/t/templates/data/foot.html
new file mode 100644
index 0000000..5179ade
--- /dev/null
+++ b/t/templates/data/foot.html
@@ -0,0 +1,3 @@
+
+ </body>
+</html>
diff --git a/t/templates/data/head.html b/t/templates/data/head.html
new file mode 100644
index 0000000..17c1753
--- /dev/null
+++ b/t/templates/data/head.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+ <head>
+ <link rel="alternate" type="application/rss+xml" title="RSS" href="$url/index.rss" >
+ <title>$blog_title $path_info_da $path_info_mo $path_info_yr</title>
+ </head>
+ <body>
+ <h1>$blog_title</h1>
+ <h2>$path_info_da $path_info_mo $path_info_yr</h2>
diff --git a/t/templates/data/story.html b/t/templates/data/story.html
new file mode 100644
index 0000000..7f3d068
--- /dev/null
+++ b/t/templates/data/story.html
@@ -0,0 +1,3 @@
+ <h4><a name="$fn">$title</a></h4>
+ <div>$body</div>
+ <p>posted at: $ti | path: <a href="$url$path">$path </a> | <a href="$url/$yr/$mo_num/$da#$fn">permanent link to this entry</a></p>
diff --git a/t/templates/data/web/2.txt b/t/templates/data/web/2.txt
new file mode 100644
index 0000000..9d04c49
--- /dev/null
+++ b/t/templates/data/web/2.txt
@@ -0,0 +1,10 @@
+Lorem ipsum II
+
+Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.
+
diff --git a/t/templates/data/web/2.txt.200711111111 b/t/templates/data/web/2.txt.200711111111
new file mode 100644
index 0000000..9d04c49
--- /dev/null
+++ b/t/templates/data/web/2.txt.200711111111
@@ -0,0 +1,10 @@
+Lorem ipsum II
+
+Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.
+
diff --git a/t/templates/expected.html b/t/templates/expected.html
new file mode 100644
index 0000000..c068b57
--- /dev/null
+++ b/t/templates/expected.html
@@ -0,0 +1,45 @@
+Content-Type: text/xhtml; charset=UTF-8
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+ <head>
+ <link rel="alternate" type="application/rss+xml" title="RSS" href="http://localhost/index.rss" >
+ <title>My Weblog </title>
+ </head>
+ <body>
+ <h1>My Weblog</h1>
+ <h2> </h2>
+ <h3>2007-11-11</h3>
+ <h4><a name="2">Lorem ipsum II</a></h4>
+ <div>
+Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.
+</div>
+ <p>posted at: 11:11 | path: <a href="http://localhost/web">/web </a> | <a href="http://localhost/2007/11/11#2">permanent link to this entry</a></p>
+ <h3>2006-07-19</h3>
+ <h4><a name="1">Lorem ipsum</a></h4>
+ <div>Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+facto.Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet
+ipso facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor
+sit amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.Lorem ipso foer tyr wuz de ramas cora dola tym
+ipso hor tyr wuz de ramas cora dola tymon ipso foer tyr wuz de ramas
+cora dola tymo. Lorem ipso hoccer foer tyr wuz de ras cora dola tymon
+ipso hoc cer fuz de ramas cora dola tymon ipso hoccer. Lorem ipso foer
+tyr wuz de ramas cora dola tym ipso hor.</div>
+ <p>posted at: 22:54 | path: <a href="http://localhost"> </a> | <a href="http://localhost/2006/07/19#1">permanent link to this entry</a></p>
+
+ </body>
+</html>
diff --git a/t/templates/expected.rss b/t/templates/expected.rss
new file mode 100644
index 0000000..706a2f2
--- /dev/null
+++ b/t/templates/expected.rss
@@ -0,0 +1,34 @@
+Content-Type: text/xml; charset=ISO-8859-1
+
+<?xml version="1.0"?>
+<!-- name="generator" content="blosxom/2.1.0" -->
+<!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN" "http://my.netscape.com/publish/formats/rss-0.91.dtd">
+
+<rss version="0.91">
+ <channel>
+ <title>My Weblog </title>
+ <link>http://localhost/./blosxom.cgi</link>
+ <description>Yet another Blosxom weblog.</description>
+ <language>en</language>
+
+ <item>
+ <title>Lorem ipsum</title>
+ <link>http://localhost/./blosxom.cgi/2006/07/19#1</link>
+ <description>Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+facto.Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet
+ipso facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor
+sit amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.Lorem ipso foer tyr wuz de ramas cora dola tym
+ipso hor tyr wuz de ramas cora dola tymon ipso foer tyr wuz de ramas
+cora dola tymo. Lorem ipso hoccer foer tyr wuz de ras cora dola tymon
+ipso hoc cer fuz de ramas cora dola tymon ipso hoccer. Lorem ipso foer
+tyr wuz de ramas cora dola tym ipso hor.</description>
+ </item>
+ </channel>
+</rss>
diff --git a/t/templates/expected/index.html b/t/templates/expected/index.html
new file mode 100644
index 0000000..b0714d8
--- /dev/null
+++ b/t/templates/expected/index.html
@@ -0,0 +1,46 @@
+Content-Type: text/xhtml; charset=UTF-8
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+ <head>
+ <link rel="alternate" type="application/rss+xml" title="RSS" href="http://localhost/index.rss" />
+ <title>My Weblog
+ </title>
+ </head>
+ <body>
+ <h1>My Weblog</h1>
+ <h2> </h2>
+ <h3>2007-11-11</h3>
+ <h4><a name="2">Lorem ipsum II</a></h4>
+ <div>
+Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.
+</div>
+ <p>posted at: 11:11 | path: <a href="http://localhost/web">/web </a> | <a href="http://localhost/2007/11/11#2">permanent link to this entry</a></p>
+ <h3>2006-07-19</h3>
+ <h4><a name="1">Lorem ipsum</a></h4>
+ <div>Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+facto.Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet
+ipso facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor
+sit amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.Lorem ipso foer tyr wuz de ramas cora dola tym
+ipso hor tyr wuz de ramas cora dola tymon ipso foer tyr wuz de ramas
+cora dola tymo. Lorem ipso hoccer foer tyr wuz de ras cora dola tymon
+ipso hoc cer fuz de ramas cora dola tymon ipso hoccer. Lorem ipso foer
+tyr wuz de ramas cora dola tym ipso hor.</div>
+ <p>posted at: 22:54 | path: <a href="http://localhost"> </a> | <a href="http://localhost/2006/07/19#1">permanent link to this entry</a></p>
+
+ </body>
+</html>
diff --git a/t/templates/expected/index.rss b/t/templates/expected/index.rss
new file mode 100644
index 0000000..e22dfc8
--- /dev/null
+++ b/t/templates/expected/index.rss
@@ -0,0 +1,65 @@
+Content-Type: text/xml; charset=UTF-8
+
+<?xml version="1.0" encoding="UTF-8"?>
+<rss version="2.0"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
+ xmlns:atom="http://www.w3.org/2005/Atom">
+
+ <channel>
+ <title>My Weblog</title>
+ <link>http://localhost/</link>
+ <description>Yet another Blosxom weblog.</description>
+ <managingEditor>author@example.com (A. U. Thor)</managingEditor>
+ <webMaster>author@example.com (A. U. Thor)</webMaster>
+ <pubDate>Sun, 11 Nov 2007 11:11:00 +0000</pubDate>
+ <language>en</language>
+ <generator>blosxom 2.1.0</generator>
+ <atom:link href="http://localhost/index.rss" rel="self" type="application/rss+xml" />
+ <sy:updatePeriod>hourly</sy:updatePeriod>
+ <sy:updateFrequency>1</sy:updateFrequency>
+ <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
+
+
+ <item>
+ <title>Lorem ipsum II</title>
+ <link>http://localhost/web/2.html</link>
+ <guid isPermaLink="true">http://localhost/web/2.html</guid>
+ <pubDate>Sun, 11 Nov 2007 11:11:00 +0000</pubDate>
+ <description>
+Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.
+
+ </description>
+ </item>
+
+ <item>
+ <title>Lorem ipsum</title>
+ <link>http://localhost/1.html</link>
+ <guid isPermaLink="true">http://localhost/1.html</guid>
+ <pubDate>Wed, 19 Jul 2006 22:54:00 +0000</pubDate>
+ <description>Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+facto.Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet
+ipso facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor
+sit amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.Lorem ipso foer tyr wuz de ramas cora dola tym
+ipso hor tyr wuz de ramas cora dola tymon ipso foer tyr wuz de ramas
+cora dola tymo. Lorem ipso hoccer foer tyr wuz de ras cora dola tymon
+ipso hoc cer fuz de ramas cora dola tymon ipso hoccer. Lorem ipso foer
+tyr wuz de ramas cora dola tym ipso hor.
+ </description>
+ </item>
+
+ </channel>
+</rss>
diff --git a/t/templates/expected/web/index.html b/t/templates/expected/web/index.html
new file mode 100644
index 0000000..37c232a
--- /dev/null
+++ b/t/templates/expected/web/index.html
@@ -0,0 +1,28 @@
+Content-Type: text/xhtml; charset=UTF-8
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+ <head>
+ <link rel="alternate" type="application/rss+xml" title="RSS" href="http://localhost/index.rss" />
+ <title>My Weblog
+ </title>
+ </head>
+ <body>
+ <h1>My Weblog</h1>
+ <h2> </h2>
+ <h3>2007-11-11</h3>
+ <h4><a name="2">Lorem ipsum II</a></h4>
+ <div>
+Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.
+</div>
+ <p>posted at: 11:11 | path: <a href="http://localhost/web">/web </a> | <a href="http://localhost/2007/11/11#2">permanent link to this entry</a></p>
+
+ </body>
+</html>
diff --git a/t/templates/expected/web/index.rss b/t/templates/expected/web/index.rss
new file mode 100644
index 0000000..748a86e
--- /dev/null
+++ b/t/templates/expected/web/index.rss
@@ -0,0 +1,43 @@
+Content-Type: text/xml; charset=UTF-8
+
+<?xml version="1.0" encoding="UTF-8"?>
+<rss version="2.0"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
+ xmlns:atom="http://www.w3.org/2005/Atom">
+
+ <channel>
+ <title>My Weblog</title>
+ <link>http://localhost/</link>
+ <category>web</category>
+ <description>Yet another Blosxom weblog.</description>
+ <managingEditor>author@example.com (A. U. Thor)</managingEditor>
+ <webMaster>author@example.com (A. U. Thor)</webMaster>
+ <pubDate>Sun, 11 Nov 2007 11:11:00 +0000</pubDate>
+ <language>en</language>
+ <generator>blosxom 2.1.0</generator>
+ <atom:link href="http://localhost/web/index.rss" rel="self" type="application/rss+xml" />
+ <sy:updatePeriod>hourly</sy:updatePeriod>
+ <sy:updateFrequency>1</sy:updateFrequency>
+ <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
+
+
+ <item>
+ <title>Lorem ipsum II</title>
+ <link>http://localhost/web/2.html</link>
+ <guid isPermaLink="true">http://localhost/web/2.html</guid>
+ <pubDate>Sun, 11 Nov 2007 11:11:00 +0000</pubDate>
+ <description>
+Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso
+facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit
+amet ipso facto.Lorem ipsum dolor sit amet ipso facto.
+
+Lorem ipso hoccer foer tyr wuz de ras cora dola tymon ipso hoc cer fuz
+de ramas cora dola tymon ipso hoccer. Lorem ipso foer tyr wuz de ramas
+cora dola tym ipso hor.
+
+ </description>
+ </item>
+
+ </channel>
+</rss>
diff --git a/t/templates/spec.yaml b/t/templates/spec.yaml
new file mode 100644
index 0000000..93883d3
--- /dev/null
+++ b/t/templates/spec.yaml
@@ -0,0 +1,4 @@
+tests:
+ -
+ - ""
+ - expected.html