Skip Menu |

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

Report information
The Basics
Id: 56334
Status: resolved
Priority: 0/
Queue: XML-LibXML

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

Bug Information
Severity: Normal
Broken in: 1.70
Fixed in: (no value)



Subject: Convert 02parse.t to Test::More for easier testing
In order to debug RT #50829, I've converted 02parse.t to Test::More. I'm including the patch that changes tests in place and test count stays the same:
Subject: patch.txt

Message body is not shown because it is too large.

I'm adding a second patch that has to be applied after the above, which increases tests by testing what the diag messages seemed to be implying you intended to test
Subject: patch.txt
diff --git a/t/02parse.t b/t/02parse.t index 5534dc0..9722823 100644 --- a/t/02parse.t +++ b/t/02parse.t @@ -4,7 +4,7 @@ # this test checks the parsing capabilities of XML::LibXML # it relies on the success of t/01basic.t -use Test::More tests => 496; +use Test::More tests => 531; use IO::File; use XML::LibXML::Common qw(:libxml); @@ -339,7 +339,7 @@ diag("2 PUSH PARSER"); my $doc; eval {$doc = $pparser->parse_chunk("",1); }; is($@, '', "No error parsing $key"); -# isa_ok($doc, 'XML::LibXML::Document', "Document came back parsing chunk: "); + isa_ok($doc, 'XML::LibXML::Document', "Document came back parsing chunk: "); } my @good_strings = ("<foo>", "bar", "</foo>" ); @@ -950,7 +950,7 @@ sub tsub2 { return [ $doc->findnodes(encodeToUTF8('iso-8859-1',$query)) ]; } -sub shorten_string { +sub shorten_string { # Used for test naming. my $string = shift; return "'undef'" if(!defined $string);
On Tue Apr 06 18:51:15 2010, TODDR wrote: Show quoted text
> In order to debug RT #50829, I've converted 02parse.t to Test::More. > I'm including the patch that changes tests in place and test count > stays the same:
Both patches were applied into the repository, and will be available in in the next release. Next time - please don't convert the print "..."s to diag()s as they obscure the output of "make test".
Show quoted text
> Both patches were applied into the repository, and will be available in > in the next release. Next time - please don't convert the print "..."s > to diag()s as they obscure the output of "make test".
Thanks, but print is generally not a good idea. Perhaps note instead of diag would get you what you want? http://search.cpan.org/~mschwern/Test-Simple-0.98/lib/Test/More.pm#note
On Thu Jun 23 23:35:47 2011, TODDR wrote: Show quoted text
> > Both patches were applied into the repository, and will be available
> in
> > in the next release. Next time - please don't convert the print
> "..."s
> > to diag()s as they obscure the output of "make test".
> > Thanks, but print is generally not a good idea. Perhaps note instead > of diag would get you what > you want? >
I didn't keep it as "print" - I just converted them to comments so they will be invisible. That's what should be done, because they are of no use for the test output. Please don't reply to this bug report because it will reopen it. Regards, -- Shlomi Fish