Skip Menu |
 

This queue is for tickets about the XML-Grove CPAN distribution.

Report information
The Basics
Id: 69723
Status: open
Priority: 0/
Queue: XML-Grove

People
Owner: Nobody in particular
Requestors: POPIEL [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.46alpha
Fixed in: (no value)



Subject: XML::Grove does not pass tests
Download (untitled) / with headers
text/plain 367b
The non-ASCII characters in the string literals for tests 3 and 4 in t/grove.t don't match modern perl usage, and thus the tests fail. This is unfortunate, because XML::Grove is otherwise perfectly operating. I'll submit a patch once I figure out how to quote stuff properly so that the source file isn't charset-dependent... but that may take a little while...
Download (untitled) / with headers
text/plain 103b
Patch is attached. Not the prettiest, but I'm fairly sure it will be robust against encoding changes.
Subject: NonASCII.patch
Download NonASCII.patch
text/x-diff 5.8k
diff --git a/t/grove.t b/t/grove.t index a1ab816..8632764 100644 --- a/t/grove.t +++ b/t/grove.t @@ -106,9 +106,10 @@ print "ok 2\n"; # TEST: as_cannon_xml $expected = <<'EOF'; -<bible>&#10;<testament><title>The Old Testament</title>&#10;...&#10;<book id="OneKings"> &#10;<title>The First Book of the Kings</title>&#10;<subtitle>Commonly called The Third Book of the Kings</subtitle>&#10;...&#10;<chapter num="19">&#10;<narrative>Jezebel threatens Elijah</narrative>&#10;<verse dotted="true" num="1">And Āʹhăb told Jĕzʹe-bĕl&#10;all that E˔-līʹjah had done, and withal how he had slain all the prophets with&#10;the sword.&#10;<xref c="18" v="40"></xref></verse>&#10;<verse dotted="true" num="2">Then Jĕzʹe-bĕl sent a messenger unto E˔-līʹjah,&#10;saying, So let the gods do <i>to me</i>, and more also, if I make not thy life&#10;as the life of one of them by to morrow about this time.&#10;<xref b="Ru" c="1" v="17"></xref>&#10;<xref c="2" v="23"></xref>&#10;<xref c="27" n="Pr" v="1"></xref>&#10;</verse>&#10;<verse dotted="false" num="3">And when he saw <i>that</i>, he arose, and went&#10;for his life, and came to Bēʹer-shēʹbȧ, which <i>belongeth</i> to&#10;Jūʹdah, and left his servant there.</verse>&#10;<verse dotted="true" num="4">¶ But he himself went a day's journey&#10;into the wilderness, and came and sat down under a juniper tree: and he&#10;requested for himself that he might die; and said, It is enough; now, O L<smallcaps>ORD</smallcaps>,&#10;take away my life; for I <i>am</i> not better than my fathers.&#10;<xref b="Nu" c="11" v="15"></xref>&#10;<xref b="Jon" c="4" v="3,8"></xref>&#10;<xref b="Ph" c="1" v="21-24"></xref>&#10;<footnote>for himself, or for his life</footnote>&#10;</verse>&#10;<narrative>An angel ministers to him</narrative>&#10;<verse dotted="true" num="5">And as he lay and slept under a juniper tree,&#10;behold, then an angel touched him, and said unto him, Arise <i>and</i> eat.&#10;<xref b="Ps" c="34" v="7"></xref>&#10;<xref b="Ac" c="12" v="7"></xref>&#10;<xref b="Heb" c="1" v="14"></xref>&#10;</verse>&#10;...&#10;</chapter>&#10;...&#10;</book>&#10;...&#10;</testament>&#10;...&#10;</bible> +<bible>&#10;<testament><title>The Old Testament</title>&#10;...&#10;<book id="OneKings"> &#10;<title>The First Book of the Kings</title>&#10;<subtitle>Commonly called The Third Book of the Kings</subtitle>&#10;...&#10;<chapter num="19">&#10;<narrative>Jezebel threatens Elijah</narrative>&#10;<verse dotted="true" num="1">And --100----2b9--h--103--b told J--115--z--2b9--e-b--115--l&#10;all that E--2d4---l--12b----2b9--jah had done, and withal how he had slain all the prophets with&#10;the sword.&#10;<xref c="18" v="40"></xref></verse>&#10;<verse dotted="true" num="2">Then J--115--z--2b9--e-b--115--l sent a messenger unto E--2d4---l--12b----2b9--jah,&#10;saying, So let the gods do <i>to me</i>, and more also, if I make not thy life&#10;as the life of one of them by to morrow about this time.&#10;<xref b="Ru" c="1" v="17"></xref>&#10;<xref c="2" v="23"></xref>&#10;<xref c="27" n="Pr" v="1"></xref>&#10;</verse>&#10;<verse dotted="false" num="3">And when he saw <i>that</i>, he arose, and went&#10;for his life, and came to B--113----2b9--er-sh--113----2b9--ba--307--, which <i>belongeth</i> to&#10;J--16b----2b9--dah, and left his servant there.</verse>&#10;<verse dotted="true" num="4">--b6-- But he himself went a day's journey&#10;into the wilderness, and came and sat down under a juniper tree: and he&#10;requested for himself that he might die; and said, It is enough; now, O L<smallcaps>ORD</smallcaps>,&#10;take away my life; for I <i>am</i> not better than my fathers.&#10;<xref b="Nu" c="11" v="15"></xref>&#10;<xref b="Jon" c="4" v="3,8"></xref>&#10;<xref b="Ph" c="1" v="21-24"></xref>&#10;<footnote>for himself, or for his life</footnote>&#10;</verse>&#10;<narrative>An angel ministers to him</narrative>&#10;<verse dotted="true" num="5">And as he lay and slept under a juniper tree,&#10;behold, then an angel touched him, and said unto him, Arise <i>and</i> eat.&#10;<xref b="Ps" c="34" v="7"></xref>&#10;<xref b="Ac" c="12" v="7"></xref>&#10;<xref b="Heb" c="1" v="14"></xref>&#10;</verse>&#10;...&#10;</chapter>&#10;...&#10;</book>&#10;...&#10;</testament>&#10;...&#10;</bible> EOF chop ($expected); +$expected =~ s/--([0-9a-fA-F]+)--/chr(hex($1))/ge; $got = $g->as_canon_xml; print (($got eq $expected) ? "ok 3\n" : "not ok 3\n"); @@ -124,11 +125,11 @@ Commonly called The Third Book of the Kings ... Jezebel threatens Elijah -And Āʹhăb told Jĕzʹe-bĕl -all that E˔-līʹjah had done, and withal how he had slain all the prophets with +And --100----2b9--h--103--b told J--115--z--2b9--e-b--115--l +all that E--2d4---l--12b----2b9--jah had done, and withal how he had slain all the prophets with the sword. -Then Jĕzʹe-bĕl sent a messenger unto E˔-līʹjah, +Then J--115--z--2b9--e-b--115--l sent a messenger unto E--2d4---l--12b----2b9--jah, saying, So let the gods do to me, and more also, if I make not thy life as the life of one of them by to morrow about this time. @@ -136,9 +137,9 @@ as the life of one of them by to morrow about this time. And when he saw that, he arose, and went -for his life, and came to Bēʹer-shēʹbȧ, which belongeth to -Jūʹdah, and left his servant there. -¶ But he himself went a day's journey +for his life, and came to B--113----2b9--er-sh--113----2b9--ba--307--, which belongeth to +J--16b----2b9--dah, and left his servant there. +--b6-- But he himself went a day's journey into the wilderness, and came and sat down under a juniper tree: and he requested for himself that he might die; and said, It is enough; now, O LORD, take away my life; for I am not better than my fathers. @@ -163,6 +164,7 @@ behold, then an angel touched him, and said unto him, Arise and eat. ... EOF +$expected =~ s/--([0-9a-fA-F]+)--/chr(hex($1))/ge; $got = $g->as_string; print (($got eq $expected) ? "ok 4\n" : "not ok 4\n");
From: dan.thibadeau [...] hp.com
Download (untitled) / with headers
text/plain 115b
To resolve, just add: use encoding 'utf8'; before testing starts in file "t/grove.t". Works for perl 5.16.0


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.