6 use Test::More qw( no_plan );
17 opendir(my $dh, $orig_cwd) or die("Opendir failed: $!");
19 my @tests = grep { /^t-/ } readdir $dh;
21 for my $testdir (@tests) {
22 my (undef, $test) = split /-/, $testdir, 2;
27 my $spec = YAML::LoadFile ("spec.yaml");
30 fail ("$test - loading spec");
36 copy("../../blosxom.cgi", ".") or die("Copy failed: $!");
37 chmod(0777, "blosxom.cgi");
39 system("perl -pi -e 's{/Library/WebServer/Documents/blosxom}{$cwd/data}' blosxom.cgi") == 0
44 for (@{$spec->{tests}}) {
45 my ($args, $output) = @$_;
47 system("./blosxom.cgi $args > ${output}.got") == 0
50 if (ok(compare("${output}.got", $output) == 0,
51 "$test - Got expected output for args [$args]")) {
52 unlink("${output}.got");
59 unlink("blosxom.cgi");
69 if (/^(.*)\.(\d+)$/) {