/[Frey]/trunk/lib/Frey/Test/Runner.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/lib/Frey/Test/Runner.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 494 by dpavlin, Mon Nov 24 20:51:26 2008 UTC revision 503 by dpavlin, Mon Nov 24 21:50:05 2008 UTC
# Line 40  sub as_markup { Line 40  sub as_markup {
40          my $tests;          my $tests;
41    
42          map {          map {
43                  $tests->{$_}++ if m{\.t$};                  $tests->{$_}->{'test modified'}++ if m{\.t$};
44          } @{ $self->tests };          } @{ $self->tests };
45    
46          map {          map {
# Line 49  sub as_markup { Line 49  sub as_markup {
49                          $class =~ s{^lib/}{};                          $class =~ s{^lib/}{};
50                          $class =~ s{/}{::}g;                          $class =~ s{/}{::}g;
51                          warn "extract tests from $_ class $class";                          warn "extract tests from $_ class $class";
52                          $tests->{$_}++ foreach Frey::PPI->new( class => $class )->has_tests;                          $tests->{$_}->{$class}++ foreach Frey::PPI->new( class => $class )->has_tests;
53                  }                  }
54          } @{ $self->tests };          } @{ $self->tests };
55    
# Line 84  sub as_markup { Line 84  sub as_markup {
84          $html =~ s{^.*<body>}{}s;          $html =~ s{^.*<body>}{}s;
85          $html =~ s{</body>.*$}{}s;          $html =~ s{</body>.*$}{}s;
86    
87          $html =~ s{(<a class="file") href="#"(.+?)>t/(.+?)</a>}{<a class="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;
88    
89          return          return
90                  $self->editor_links( $html )                  $self->editor_links( $html )
91                  . qq|<ul><li>| . join("</li>\n<li>", map { qq|<a href="#$_"><tt>$_</tt></a>| } @tests) . qq|</li></ul>|                  . qq|<ul><li>|
92                    . join("</li>\n<li>",
93                            map {
94                                    qq|<a href="#$_"><tt>$_</tt></a> &larr; |
95                                    .
96                                    join(' ',
97                                            map {
98                                                    if ( m{\s} ) {
99                                                            $_      # human comment with space
100                                                    } else {
101                                                            qq|<a target="introspect" href="/$_" title="introspect">$_</a>|
102    #                                                       qq|<a target="editor" href="/editor+$_+1" title="edit">$_</a>|
103                                                    }
104                                            } keys %{ $tests->{$_} }
105                                    )
106                            } @tests )
107                    . qq|</li></ul>|
108                  ;                  ;
109                    
110  }  }

Legend:
Removed from v.494  
changed lines
  Added in v.503

  ViewVC Help
Powered by ViewVC 1.1.26