summaryrefslogtreecommitdiff
path: root/t/plugin_list
diff options
context:
space:
mode:
Diffstat (limited to 't/plugin_list')
-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
16 files changed, 86 insertions, 0 deletions
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