Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: How to get the output from make test into a text file? (HTML-Element-Library)

by tphyahoo (Vicar)
on Jul 12, 2005 at 17:41 UTC ( #474345=note: print w/replies, xml ) Need Help??


in reply to Re: How to get the output from make test into a text file? (HTML-Element-Library)
in thread How to get the output from make test into a text file? (HTML-Element-Library)

I figured out why I am having problems, and a fix.

What I haven't figured out is, why am I having problems, but the tests pass on CPAN, as you say. I am guessing that this has to do with a dependency: File::Slurp, or HTML::Element, or one of those. I wonder, is there any way I can determine what versions of the dependency modules the CPAN tester had? At any rate, the problem I was having is that some of your tests generate files, which then get read back in with File::Slurp.

For whatever reason, when they were getting read back in, there was an extra line break coming in as well. I have noticed this problem before; I believe it has to do with inconsitent line breaks between windows (\x0d\x0a, aka form feed then line break) and unix. The end effect is that I, every now and then, wind up with strings of \x0d\x0d\x0d\x0a, ie, too many repeated form feed before the final line breaks.

Yuck fu.

But anyway, the fix is to change:

#snip of highlander.t my $generated_html = ptree($tree, "$root.gen"); is ($generated_html, File::Slurp::read_file("$root.exp"), "HTML for +$age");
to
my $generated_html = ptree($tree, "$root.gen"); my $file = File::Slurp::read_file("$root.exp"); $file =~ s/\x0d+\x0a/ /g; is ($generated_html, $file, "HTML for $age");
Ugly as hell, but it got all highlander.t tests to pass.

I didn't fix any other tests, but if you would like me to, I wouldn't mind delving deeper into this.

The other tests that failed were iter.t, table-alt.t, table.t, and unroll-select.t.

Thanks again for putting together a great module.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://474345]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2020-07-05 11:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?