77 |
|
|
78 |
@tests = ( $self->test ) if $self->test; |
@tests = ( $self->test ) if $self->test; |
79 |
|
|
80 |
@tests = grep { |
if ( my $depends = $self->depends ) { |
81 |
! m{$0} # break recursion |
@tests = grep { |
82 |
} sort keys %{ $self->depends } unless @tests; |
$_ ne '' && |
83 |
|
! m{$0} # break recursion |
84 |
|
} sort keys %{ $depends } unless @tests; |
85 |
|
} |
86 |
|
|
87 |
push @{ $self->status }, { test => { depends => $self->depends } }; # FIXME |
$self->add_status( { test => { depends => $self->depends } } ); |
88 |
|
|
89 |
if ( ! @tests ) { |
if ( ! @tests ) { |
90 |
warn "can't find any tests ", dump( $self->tests ), " within depends ", dump( $self->depends ); |
warn "can't find any tests ", dump( $self->tests ), " within depends ", dump( $self->depends ); |
102 |
warn "got ",length($html), " bytes"; |
warn "got ",length($html), " bytes"; |
103 |
|
|
104 |
while ( $html =~ s{(<style.+?/style>)}{}gs ) { |
while ( $html =~ s{(<style.+?/style>)}{}gs ) { |
105 |
$self->add_head( $1 ); |
my $style = $1; |
106 |
|
$style =~ s[((?:body|html)\s+{[^}]+})][/\* $1 \*/]sg; # remove some styles |
107 |
|
$self->add_head( $style ); |
108 |
} |
} |
109 |
|
|
110 |
$self->add_head(qq| |
$self->add_head(qq| |
114 |
td.results:hover ul.test-out { display: block; } |
td.results:hover ul.test-out { display: block; } |
115 |
</style> |
</style> |
116 |
|); |
|); |
117 |
|
$html =~ s{<div id="menu">.+?</div>}{}sg; # remove menu which doesn't work without JavaScript |
118 |
|
|
119 |
$html =~ s{^.*<body>}{}s; |
$html =~ s{^.*<body>}{}s; |
120 |
$html =~ s{</body>.*$}{}s; |
$html =~ s{</body>.*$}{}s; |
121 |
|
|
122 |
$html =~ s{(<a class="file") href="#"(.+?)>t/(.+?)</a>}{<a target="editor" href="/editor+t/$3.t+1" name="t/$3.t" $2>$3</a>}sg; |
$html =~ s{(<a class="file") href="#"(.+?)>t/(.+?)</a>}{<a target="editor" href="/editor+t/$3.t+1" name="t/$3.t" $2>$3</a>}sg; |
123 |
|
|
124 |
return |
$html = $self->editor_links( $html ); |
125 |
$self->editor_links( $html ) |
|
126 |
. qq|Test dependencies:<ul><li>| |
if ( my $depends = $self->depends ) { |
127 |
|
$html .= qq|Test dependencies:| |
128 |
|
. qq|<ul><li>| |
129 |
. join("</li>\n<li>", |
. join("</li>\n<li>", |
130 |
map { |
map { |
131 |
qq|<a href="#$_"><tt>$_</tt></a> ← | |
qq|<a href="#$_"><tt>$_</tt></a> ← | |
143 |
} @tests ) |
} @tests ) |
144 |
. qq|</li></ul>| |
. qq|</li></ul>| |
145 |
; |
; |
146 |
|
} |
147 |
|
|
148 |
} |
} |
149 |
|
|