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

Test cleanup: should not duplicate code between TODO and non-TODO branches #88

Closed
zmughal opened this issue Mar 22, 2015 · 2 comments
Closed

Comments

@zmughal
Copy link
Member

zmughal commented Mar 22, 2015

see t/pdl_from_string.t which has code in the form

if( $cond ) {   TODO: { local $TODO = 'todo'; code() } } else { code() }

Grep for "ActivePerl and/or perls built using MS compilers might fail this test".

@zmughal
Copy link
Member Author

zmughal commented Mar 22, 2015

Turn the above code into:

TODO: {
    local $TODO if( $cond );
    code();
}

You can not use

TODO: {
    if( $cond) { local $TODO }
    code();
}

because that is a new scope and thus $TODO won't be seen by Test::Builder.

@zmughal zmughal self-assigned this Mar 22, 2015
@zmughal
Copy link
Member Author

zmughal commented Mar 24, 2015

Fixed on test-cleanup-pt-deux branch.

@zmughal zmughal closed this as completed Mar 24, 2015
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

1 participant