1 # blosxom standard $plugin_dir testing
4 use Test::More tests => 1;
9 my $blosxom_root = 'plugin_dir';
10 $blosxom_root = "t/$blosxom_root" if -d "t/$blosxom_root";
11 $blosxom_root = cwd . "/$blosxom_root";
12 die "cannot find root '$blosxom_root'"
13 unless -d $blosxom_root;
15 my $blosxom_config_dir = "$blosxom_root/config";
16 die "cannot find blosxom config dir '$blosxom_config_dir'" unless -d $blosxom_config_dir;
17 $ENV{BLOSXOM_CONFIG_DIR} = $blosxom_config_dir;
19 my $blosxom_cgi = "$blosxom_root/../../blosxom.cgi";
20 die "cannot find blosxom.cgi '$blosxom_cgi'" unless -f $blosxom_cgi;
21 die "blosxom.cgi '$blosxom_cgi' is not executable" unless -x $blosxom_cgi;
23 my $fh = IO::File->new("$blosxom_root/expected.html", 'r')
24 or die "cannot open expected output file '$blosxom_root/expected.html': $!";
32 my $output = qx($blosxom_cgi);
34 eq_or_diff($output, $expected, 'html output ok');