Changeset 2843

Show
Ignore:
Timestamp:
07/25/08 21:53:59 (4 months ago)
Author:
bchoate
Message:

Fixed testing for extended tags.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/release-42/t/91-tagcoverage.t

    r2836 r2843  
    6060    my $all_docs = ''; 
    6161    my $tags = $mt->component($c)->registry('tags'); 
     62    my $core_tags = $mt->component('core')->registry('tags') 
     63        unless $c eq 'core'; 
     64 
    6265    my $paths = $components->{$c}{paths}; 
    6366    { 
     
    102105    foreach my $tag ( keys %{ $tags->{function} } ) { 
    103106        next if $tag eq 'plugin'; 
    104         ok(exists $doc_names->{$tag}, "component $c, function tag $tag"); 
     107        if ($core_tags && $core_tags->{function}{$tag}) { 
     108            ok(1, "component $c, function tag $tag (extends core tag)"); 
     109        } else { 
     110            ok(exists $doc_names->{$tag}, "component $c, function tag $tag"); 
     111        } 
    105112    } 
    106113 
     
    108115        next if $tag eq 'plugin'; 
    109116        $tag =~ s/\?$//; 
    110         ok(exists $doc_names->{$tag}, "component $c, block tag $tag"); 
     117        if ($core_tags && $core_tags->{block}{$tag}) { 
     118            ok(1, "component $c, block tag $tag (extends core tag)"); 
     119        } else { 
     120            ok(exists $doc_names->{$tag}, "component $c, block tag $tag"); 
     121        } 
    111122    } 
    112123 
    113124    foreach my $tag ( keys %{ $tags->{modifier} } ) { 
    114125        next if $tag eq 'plugin'; 
    115         ok(exists $doc_names->{$tag}, "component $c, modifier $tag"); 
     126        if ($core_tags && $core_tags->{modifier}{$tag}) { 
     127            ok(1, "component $c, modifier $tag (extends core tag)"); 
     128        } else { 
     129            ok(exists $doc_names->{$tag}, "component $c, modifier $tag"); 
     130        } 
    116131    } 
    117132}