--- trunk/lib/Frey/Test/Runner.pm 2008/11/25 00:26:15 507 +++ trunk/lib/Frey/Test/Runner.pm 2008/11/25 17:15:18 519 @@ -59,9 +59,15 @@ }, ); +our $running; +exit if $running; + sub as_markup { my ($self) = @_; + return 'allready running' if $running; + $running = 1; + my $f = TAP::Formatter::HTML->new({ # silent => 1, @@ -79,6 +85,7 @@ if ( my $depends = $self->depends ) { @tests = grep { + $_ ne '' && ! m{$0} # break recursion } sort keys %{ $depends } unless @tests; } @@ -91,6 +98,8 @@ @tests = glob('t/*.t'); } + $self->title( join(' ', @tests ) ); + warn "testing ",dump( @tests ); $h->runtests( @tests ); @@ -101,7 +110,9 @@ warn "got ",length($html), " bytes"; while ( $html =~ s{()}{}gs ) { - $self->add_head( $1 ); + my $style = $1; + $style =~ s[((?:body|html)\s+{[^}]+})][/\* $1 \*/]sg; # remove some styles + $self->add_head( $style ); } $self->add_head(qq| @@ -111,18 +122,21 @@ td.results:hover ul.test-out { display: block; } |); + $html =~ s{}{}sg; # remove menu which doesn't work without JavaScript $html =~ s{^.*}{}s; $html =~ s{.*$}{}s; $html =~ s{(t/(.+?)}{$3}sg; - return - $self->editor_links( $html ) - . qq|Test dependencies: