summaryrefslogtreecommitdiff
path: root/t/plugin_dir
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 /t/plugin_dir
downloadblosxom-master.tar.gz
blosxom-master.zip
Import blosxom-2.2.0.tar.gzHEADlocal/blosxommaster
Diffstat (limited to 't/plugin_dir')
-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
14 files changed, 64 insertions, 0 deletions
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