[MKDoc-commit] Added test for tagger bug with numbers

bruno at mkdoc.demon.co.uk bruno at mkdoc.demon.co.uk
Wed Mar 9 13:25:20 GMT 2005


Log Message:
-----------
Added test for tagger bug with numbers

Modified Files:
--------------
    MKDoc-XML:
        Changes
        MANIFEST

Added Files:
-----------
    MKDoc-XML:
        .cvsignore
    MKDoc-XML/t:
        304_MKDoc_XML_Tagger_Numbers.t

-------------- next part --------------
--- /dev/null
+++ .cvsignore
@@ -0,0 +1,5 @@
+.swp
+Makefile
+blib
+pm_to_blib
+
Index: MANIFEST
===================================================================
RCS file: /var/spool/cvs/MKDoc-XML/MANIFEST,v
retrieving revision 1.13
retrieving revision 1.14
diff -LMANIFEST -LMANIFEST -u -r1.13 -r1.14
--- MANIFEST
+++ MANIFEST
@@ -1,3 +1,4 @@
+.cvsignore
 Changes
 lib/MKDoc/XML.pm
 lib/MKDoc/XML/Decode.pm
@@ -33,6 +34,7 @@
 t/301_MKDoc_XML_Tagger_Preserve.t
 t/302_MKDoc_XML_Tagger_Spaces.t
 t/303_MKDoc_XML_Tagger_Nesting.t
+t/304_MKDoc_XML_Tagger_Numbers.t
 t/400_MKDoc_XML_Stripper.t
 t/401_MKDoc_XML_Stripper_p_not_closing.t
 t/402_MKDoc_XML_Stripper_def.t
Index: Changes
===================================================================
RCS file: /var/spool/cvs/MKDoc-XML/Changes,v
retrieving revision 1.39
retrieving revision 1.40
diff -LChanges -LChanges -u -r1.39 -r1.40
--- Changes
+++ Changes
@@ -1,5 +1,8 @@
 Revision history for MKDoc::XML 
 
+0.75
+    - Added test for tagger bug when matching numbers
+
 0.74 Thu Dec 09 14:00:00 2004
     - Fix for longstanding bug introduced in 0.66 that resulting in MKDoc::XML::Tagger producing invalid XML.
 
--- /dev/null
+++ t/304_MKDoc_XML_Tagger_Numbers.t
@@ -0,0 +1,24 @@
+#!/usr/bin/perl
+use lib ('../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>stuff 1</p>",
+        { _expr => '1', _tag => 'a', href => '/' }
+    );
+
+    # very wrong
+    # like ($text, qr|&\(<a href=\"/\">1</a>\)stuff <a href=\"/\">1</a></p>|);
+
+    # correct output
+    like ($text, qr|<p>stuff <a href=\"/\">1</a></p>|);
+}
+
+1;
+
+__END__


More information about the MKDoc-commit mailing list