Skip Menu |

This queue is for tickets about the Test-Differences-Color CPAN distribution.

Report information
The Basics
Id: 84871
Status: open
Worked: 15 min
Priority: 0/
Queue: Test-Differences-Color

People
Owner: alec [...] cpan.org
Requestors: piemas25 [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: The test description of eq_or_diff is lost, when using Test::Differences::Color
Date: Fri, 26 Apr 2013 14:24:25 +0100
To: bug-test-differences-color [...] rt.cpan.org
From: Pierre M <piemas25 [...] gmail.com>
simple example: eq_or_diff('same text', 'same text', 'test description'); outputs 'ok - test description' when i DON'T use Test::Differences::Color while it outputs L90: my return = Test::Differences::eq_or_diff($data1, $data2) when i DO use Text::Difference::Color it's really a shame, i loved this module as soon as a started using it (thank you!), but soon realized that i couldn't get any test description with it, which makes it impossible for me to use it. I must say, i don't understand the code of Test::Differences::Color, so i cannot submit a patch. Sorry about that.
HI Pierre, Thank you for using this module! I tried the case you provided but can't reproduce the problem. (https://gist.github.com/alecchen/5467467) But I noticed there's a '$' missing in the error output: my return = Test::Differences::eq_or_diff($data1, $data2) should be my $return = Test::Differences::eq_or_diff($data1, $data2) I guess that should be the root cause. To fix the problem, you could simply add the missing dollar sign manually or just reinstall this module. Alec
From: mascip [...] gmail.com
Hi Alec, I've narrowed it down to a much simpler case now: use Test::More; use Test::Differences; use Test::Differences::Color; eq_or_diff([1], [1], 'test description'); outputs: ok 1 While if i don't use Test::Differences::Color, then i get: ok 1 - test description -------------------------------------------- You're right, i forgot a $ when copying the output. This was the output error i got when i was using Test::Pretty. Without Test::Pretty, i just don't get any test description in the output. Thanks for answering so fast :-)
Hi, I found the problem is that I forgot to passing all arguments to Test::Differences. It was fixed in v0.06. Thanks for your feedback! Alec
From: mascip [...] gmail.com
Fixed indeed ! Amazing reactivity, thanks a lot Alec :-) It's really nice to have these helpful colors. Saves me quite a bit of eye strain and stress, not having to look for the little stars. Sorry i didn't find the solution myself. Test::Pretty's strange output confused me, i didn't even know where to start looking.