Commits

Anonymous committed c6b255c

Implemented the rest of the <vendor>, <fullname> and <url> functionality.

  • Participants
  • Parent commits 39bdc03

Comments (0)

Files changed (3)

File lib/XML/CompareML/HTML.pm

         my $name = $self->_impl_get_tag_text($impl, "name");
         my $url = $self->_impl_get_tag_text($impl, "url");
         my $fullname = $self->_impl_get_tag_text($impl, "fullname");
+        my $vendor = $self->_impl_get_tag_text($impl, "vendor");
         if (!defined($url))
         {
             die "URL not specified for implementation " . $self->_impl_get_name($_);
         }
         print {$fh} qq{<li><a href="} . CGI::escapeHTML($url) . qq{">} . 
-            CGI::escapeHTML(defined($fullname) ? $fullname : $name) . qq{</a></li>\n};
+            CGI::escapeHTML(defined($fullname) ? $fullname : $name) . 
+            qq{</a>} . (defined($vendor) ? " by $vendor" : "") .
+            qq{</li>\n}
+            ;
     }
 }
 1;

File t/02sys-list.t

     <<"EOF",
 <li><a href="http://www.cvshome.org/">CVS</a></li>
 <li><a href="http://subversion.tigris.org/">Subversion Version Control System</a></li>
+<li><a href="http://bazaar-vcs.org/">Bazaar</a> by Canonical</li>
+<li><a href="http://toobad.tld/">Not-Too-Bad</a> by MyCompany</li>
 EOF
     "Checking that the systems' list is correct."
 );

File t/files/scm-sys-list-1.xml

                 <url>http://subversion.tigris.org/</url>
                 <fullname>Subversion Version Control System</fullname>
             </impl>
+            <impl id="bazaar">
+                <name>Bazaar</name>
+                <url>http://bazaar-vcs.org/</url>
+                <vendor>Canonical</vendor>
+            </impl>
+            <impl id="toobad">
+                <name>Toobad</name>
+                <url>http://toobad.tld/</url>
+                <fullname>Not-Too-Bad</fullname>
+                <vendor>MyCompany</vendor>
+            </impl>
             
         </implementations>
         <timestamp>