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

Hi I'm glad you are finding some use for this module. I had been away from the monestary for awhile, so I just saw this post.

Looks like someone has given you some good advice. All tests pass on version 0.05 per CPAN. I wonder why you are having problems.

Feel free to email me should you need further feedback.

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

Replies are listed 'Best First'.
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
    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.