Test-More / TB2

Test::Builder version 2, the next generation of building testing modules in Perl
Other
1 stars 0 forks source link

Change in display of empty test names #119

Closed schwernbot closed 10 years ago

schwernbot commented 10 years ago

From: @ribasushi Date: Wednesday Oct 06, 2010 at 11:53 GMT Orig: https://github.com/Test-More/test-more/issues/84

The output of perl -MTest::More\ no_plan -e 'ok(1, "")' differs:

pre 2.0:

ok 1 - 1..1

post 2.0

ok 1 1..1

Affected test: http://github.com/adrianh/test-exception/blob/master/t/Exception.t#L157

Fail report: http://www.cpantesters.org/cpan/report/2d689f4c-d059-11df-8a3a-04cc23cd16df

schwernbot commented 10 years ago

From: @adrianh Date: Wednesday Oct 06, 2010 at 12:13 GMT Orig: https://github.com/Test-More/test-more/issues/84#issuecomment-451053

I've not been following the 2.x stuff - so unsure whether this is a bug/feature. Should a description-free test be the same output as a test with description that's the empty string?

schwernbot commented 10 years ago

From: @schwern Date: Thursday Oct 07, 2010 at 15:30 GMT Orig: https://github.com/Test-More/test-more/issues/84#issuecomment-454118

It wasn't intentional. Its one of those little fiddly things. I call it a bug, if you passed in an empty string it should remain.

schwernbot commented 10 years ago

From: @schwern Date: Thursday Nov 10, 2011 at 01:00 GMT Orig: https://github.com/Test-More/test-more/issues/84#issuecomment-2690136

That'll do it. Thanks @jkeenan.

schwernbot commented 10 years ago

From: @schwern Date: Tuesday Nov 15, 2011 at 11:08 GMT Orig: https://github.com/Test-More/test-more/issues/84#issuecomment-2743471

I decided to revert this. It's just too fiddly. When copying a name from one thing to another (such as using the subtest name as a result name) you have to be careful to preserve whether it's undef or empty string.

This difference between undef and empty string creeps out. Object attributes now can't default to empty string. That means you have to check if strings are defined before you use them. Ugg.

Sorry Adrian.

schwernbot commented 10 years ago

From: @adrianh Date: Sunday Nov 20, 2011 at 03:05 GMT Orig: https://github.com/Test-More/test-more/issues/84#issuecomment-2802284

No need to apologies! Now I know it's a feature I can tweak accordingly :-)

schwernbot commented 10 years ago

From: @schwern Date: Sunday Nov 20, 2011 at 04:25 GMT Orig: https://github.com/Test-More/test-more/issues/84#issuecomment-2802479

The plan is to write a legacy formatter that replicates all the current quirks (see #215) and make Test::Builder::Tester use that by default.