Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change in display of empty test names #84

Closed
ribasushi opened this issue Oct 6, 2010 · 6 comments
Closed

Change in display of empty test names #84

ribasushi opened this issue Oct 6, 2010 · 6 comments

Comments

@ribasushi
Copy link

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

@adrianh
Copy link

adrianh commented Oct 6, 2010

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?

@schwern
Copy link
Contributor

schwern commented Oct 7, 2010

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.

@schwern
Copy link
Contributor

schwern commented Nov 10, 2011

That'll do it. Thanks @jkeenan.

@schwern schwern closed this as completed Nov 10, 2011
@schwern
Copy link
Contributor

schwern commented Nov 15, 2011

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.

schwern added a commit that referenced this issue Nov 16, 2011
It's just too fiddly.  When copying names you have to check if the name is
undefined/doesn't exists or just empty.  Objects here like to default to empty string
make it sometimes impossible to preserve an undefined name.
@adrianh
Copy link

adrianh commented Nov 20, 2011

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

@schwern
Copy link
Contributor

schwern commented Nov 20, 2011

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants