[MKDoc-commit] Add test for bug when tagging around tagged text.

bruno at mkdoc.demon.co.uk bruno at mkdoc.demon.co.uk
Thu Dec 9 12:41:26 GMT 2004


Log Message:
-----------
Add test for bug when tagging around tagged text.

Added Files:
-----------
    MKDoc-XML/t:
        303_MKDoc_XML_Tagger_Nesting.t

-------------- next part --------------
--- /dev/null
+++ t/303_MKDoc_XML_Tagger_Nesting.t
@@ -0,0 +1,22 @@
+#!/usr/bin/perl
+use lib qw (../lib lib);
+use Test::More 'no_plan';
+use strict;
+use warnings;
+use MKDoc::XML::Tagger::Preserve;
+use MKDoc::XML::Tagger;
+
+{
+
+    my $text = MKDoc::XML::Tagger->process_data (
+        "<p>URI <i>Name</i></p>",
+        { _expr => 'URI Name', _tag => 'a', href => '/' }
+    );
+
+    #$text = '<p><a href="/">URI </a><i><a href="/">Name</a></i></p>' ."\n";
+    like ($text, qr/<p><a href=\"\/\">URI <\/a><i><a href=\"\/\">Name<\/a><\/i><\/p>/);
+}
+
+1;
+
+__END__


More information about the MKDoc-commit mailing list