6 use Test::More qw( no_plan );
16 opendir(my $dh, $orig_cwd) or die("Opendir failed: $!");
18 my @tests = grep { /^t-/ } readdir $dh;
20 for my $testdir (@tests) {
21 my (undef, $test) = split /-/, $testdir, 2;
26 my $spec = YAML::LoadFile ("spec.yaml");
29 fail ("$test - loading spec");
35 copy("../../blosxom.cgi", ".") or die("Copy failed: $!");
36 chmod(0777, "blosxom.cgi");
38 system("perl -pi -e 's{/Library/WebServer/Documents/blosxom}{$cwd/data}' blosxom.cgi") == 0
41 for (@{$spec->{tests}}) {
42 my ($args, $output) = @$_;
44 system("./blosxom.cgi $args > ${output}.got") == 0
47 if (ok(compare("${output}.got", $output) == 0,
48 "$test - Got expected output for args [$args]")) {
49 unlink("${output}.got");
56 unlink("blosxom.cgi");