Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: is (from Test::More) failed although strings seemed necessarily equal

by fsavigny (Novice)
on Jul 26, 2013 at 12:08 UTC ( #1046499=note: print w/replies, xml ) Need Help??


in reply to Re: is (from Test::More) fails although strings should (no: must!) be equal
in thread is (from Test::More) fails although strings should (no: must!) be equal

I am really baffled. Some 15 minutes, and already three answers! Thank you so much!

I chose the write-to-file route because it seemed the most accessible and transparent:

{ my $FH; open $FH, ">", "got.dump"; print $FH $returned_message; close $FH; open $FH, ">", "expected.dump"; print $FH $expected; close $FH; }

Then I compared got.dump and expected.dump on the command line, where it also became obvious that they even had different sizes. If you open the files in an editor, you see that.

The reason was indeed the copy&paste: I had somehow forgotten I had colorised some of the output, and copy&paste dropped the control codes: Bad thing.

So, that was indeed very stupid of me. I had noticed there was something irregular with the colorising, but dismissed it because I reasoned that was not part of what I needed to test because it would be plainly obvious anyway ... what a fuzzy and human way of reasoning.

is fails no longer! Thanks so much again!

Florian

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1046499]
help
Chatterbox?
[Corion]: Meh. I need to find myself a better "programming" feed than r/programming (which is just HackerNews reposts and advertisements, very little code). Maybe I should select a list of links that I liked on r/programming and then google for ...
[Corion]: ... an aggregator site that also listed (ideally) all of these links once. And maybe also have an exclude list to blacklist some of the most spammy links that the site may have never mentioned at all
[marto]: I gave up reading HN at all, and feel much better for it :P
[Corion]: Now, how to best automate that Google search ... :-)
[Corion]: marto: Yeah, I'm also short of not reading it at all. I already stopped reading it in the morning because it gave me a foul mood.
[Corion]: The good posts on HN are the non-computing posts. Most of the other stuff is maybe relevant to you if you are 20 and live in Silicon Valley...
[Corion]: Two attributes that don't describe me.
[Corion]: Maybe I should also write a curator for HN or simply not read it anymore, like you do.

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2017-07-24 13:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (354 votes). Check out past polls.