Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

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

by tphyahoo (Vicar)
on Jul 12, 2005 at 13:10 UTC ( #474268=perlquestion: print w/replies, xml ) Need Help??

tphyahoo has asked for the wisdom of the Perl Monks concerning the following question:

Kind monks, I just installed metaperl's HTML::Element::Library. Unfortunately it doesn't pass all tests on activestate, but it seems to pass at least some tests, for functionality that I need, so I am going to give it a try. I thought while I was at it I could hack at it as well.

Where I'm stuck now is nmake test gives lots of errors, and I can't scroll back to read the initial errors.

nmake test > output.txt doesn't work, and nmake test 2>output.txt doesn't work either.

What do I do?

PS, the specific functionality I will be using, if all goes well, is $element->siblings() and $element->sibdex(). Get all the html "sibling" tags at the same level in an html Treebuilder tree. Very cool. I think this is actually working for my install, so I can get the job done without hacking on the install, but I'd like to do that anyway.

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

Replies are listed 'Best First'.
Re: How to get the output from make test into a text file? (HTML-Element-Library)
by Jaap (Curate) on Jul 12, 2005 at 13:59 UTC
    Assuming you are working on Win32 and you opened a Command Prompt:
    • Right-click on the title bar
    • Choose properties
    • Select the "Layout" tab
    • Set the Screen buffer size/Height and the Window size/height to 9999
    Try again
Re: How to get the output from make test into a text file? (HTML-Element-Library)
by metaperl (Curate) on Jul 12, 2005 at 16:28 UTC
    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.

      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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://474268]
Approved by polettix
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2020-10-28 06:35 GMT
Find Nodes?
    Voting Booth?
    My favourite web site is:

    Results (260 votes). Check out past polls.