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

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

by choroba (Bishop)
on Jul 26, 2013 at 10:57 UTC ( #1046476=note: print w/replies, xml ) Need Help??

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

As posted, your strings seem to be identical. This might be a result of copy'n'paste, though, so try to save the strings directly from the code rather than copying them. Pay special attention to whitespace and invisible characters.
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
  • Comment on Re: is (from Test::More) fails although strings should (no: must!) be equal

Replies are listed 'Best First'.
Re^2: is (from Test::More) failed although strings seemed necessarily equal
by fsavigny (Novice) on Jul 26, 2013 at 12:08 UTC

    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!


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1046476]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (8)
As of 2018-03-17 16:54 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (224 votes). Check out past polls.