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
Download (untitled) / with headers
text/plain 153b
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
Download patch.txt
text/plain 27k

Message body is not shown because it is too large.

Download (untitled) / with headers
text/plain 167b
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
Download patch.txt
text/plain 956b
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);
Download (untitled) / with headers
text/plain 397b
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".
Download (untitled) / with headers
text/plain 383b
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
Download (untitled) / with headers
text/plain 633b
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


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.