Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
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");
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.

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

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others pondering the Monastery: (3)
    As of 2020-07-04 15:11 GMT
    Find Nodes?
      Voting Booth?

      No recent polls found